Comments (11)
Ah I think this was a fault by me, I did not properly set the data and config.
from easychart.
Ok easy Fix, thx for closing
On 23 Jun 2016 10:24 a.m., "Michael Klein" [email protected] wrote:
Ah I think this was a fault by me, I did not properly set the data and
config.—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAvLg6FWUWjPebhJMeJLHZsVZm62VhFjks5qOkKngaJpZM4I7xAv
.
from easychart.
Ah sorry I have to reopen it :)
I do set the data and the config. But it will show the preview and datatable from the last chart I was editing. Only as soon as I edit a field in the data table it will update the datatable and the preview to the correct / current chart.
Any idea what this could be?
from easychart.
I think there is a trigger missing somehwere, when the data or the config is being updated from outside.
from easychart.
So you are reusing the same instance? just setting different config and data when the modal opens?
any chance for jsfiddle? that would facilitate allot
from easychart.
What part of your graph was incorrect? the data or the config?
from easychart.
because https://github.com/bestuurszaken/easychart/blob/master/src/js/services/data.js#L67 will trigger an update event that will trigger the config update->
https://github.com/bestuurszaken/easychart/blob/master/src/js/services/config.js#L202
But an set
https://github.com/bestuurszaken/easychart/blob/master/src/js/services/config.js#L48
will not trigger an update, so im guessing if i add and config update there it will be fixed
from easychart.
Yes this seems to be one part of the problem. When I do update the data after setting the config, the highcharts preview div chartContainer is correct. I suggest to add a update trigger to the config set method as well.
So this way the config and data should be updated and the event distributed within easycharts. But sometimes it seems it does still not pick the change up.
The other part of the problem is, that handsontable (which I heavily assume) is not refreshing the view of the table as it is not visible in the browser when the data is updated --> as I am using a modal window (via twitter bootstap js). When I am switching between the tabs, and then back to the 'data' tab, handsontables is showing the correct data / table (which I updated earlier in easychart.
Overall I solved both problems by adding a function "triggerUdpate" to the API which will trigger the dataUpdate event to the mediator:
that.triggerUpdate = function () {
var data = that.get();
mediator.trigger('dataUpdate', data);
};
And then I add an event to my modal, that as soon as its showed it will trigger the update:
$('#easyChartModal').on('shown.bs.modal', function (e) {
easychartInstance.triggerUpdate();
});
Which will update the highcharts preview div and the datatables correctly.
from easychart.
Its up to you if you want to close this task or to keep it open for further process on this.
from easychart.
I rather fix the core issue of this.
from easychart.
the config update fix fixed the essential part and the issue with handsontable seem to be not related to the project. Because we are doing the proper data update in code.
from easychart.
Related Issues (20)
- Add travis CI to project
- Use Vue.js HOT 1
- Create plugin datasource system
- Clean up icons to a smaller format HOT 1
- Allow data filtering
- Clean up sass and remove bourbon and neat
- Add unit tests
- optimize template-svg-icons
- support for Highcharts 5.0.0 HOT 1
- make use of new Highcharts 5.0.0 methods
- How to... HOT 1
- Saving config used on a view chart HOT 3
- Setting high of chart HOT 5
- Is it possible to integrate into TinyMCE without drupal? HOT 2
- How can I keep the title the same when modifying the chart HOT 1
- Error when adding a Drupal Preset
- Basic linechart in easychart drupal displays "no data to display" when number of points are more than 1000
- Multiple datasets
- Is easychart still being developed? HOT 1
- Allow passing options to Highcharts.setOptions()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easychart.