-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getDataSets does not include options #370
Comments
Just use chart-options. Make sure you use the 1.0.0-alpha... series.
|
passing this value to chart-options does not work. It used to work in the 0.x series |
Probably because the options have changed in Chart.js 2.0 e.g. http://www.chartjs.org/docs/#line-chart-chart-options |
If you read the chartjs docs you mention you see how the dataset object should contain the options
But if getDataSets is defined like this:
I see no way to pass an option like "fill: false".
|
All options can be changed globally or individually. For a line, it looks like it would be |
I agree that your method works globally. |
Well I see your point, but it is not correct for
vs without this option: I'll have a look at |
Ok, now I see what you mean. Referring to https://github.com/chartjs/Chart.js/blob/v2.0-dev/dist/Chart.js#L2626 you are using the second way to pass the options: they are not bound to the dataset but to the It might be useful to mention this in the docs, once Chartjs 2 is officially out. Thank you! |
Yes, the only limitation is that it's per chart, not per series. I will have to add the possibility to pass the dataset directly as pointed out in #131 for that. |
Hi guys, I wrote back in February that I set You can view the result where the main chart, on the left, is drawn without filling. The main chart is a custom line chart that includes colored regions. Thanks again Jerome for your work! |
We could not set the options included in the chart dataset. We could only set the global options thanks to the directive chart-options. Therfore we could not set an option per chart like described in Issue jtblin#370 . I added a directive chart-dataset-overload. If it is present, createChart will merge both the dataset and the data set overload at the final step of the dataset creation.
We could not set the options included in the chart dataset. We could only set the global options thanks to the directive chart-options. Therfore we could not set an option per chart like described in Issue #370 . I added a directive chart-dataset-overload. If it is present, createChart will merge both the dataset and the data set overload at the final step of the dataset creation.
* add attribute `chart-dataset-overload` * complete support for `dataset-override` * rename `datasetOverload` to `datasetOverride` * use `datasetOverride` for pie and doughnut charts as well * add unit and integration tests * add examples * fix #370, #336, #391 * remove `y-axis` attribute as it can now be implemented using the `dataset-override` attribute * compile assets and minor fixes for jshint
It is now possible to override individual datasets options with #418. Published |
getDataSets is not including options in the dataset object:
With the current implementation no members other than label and data will be propagated, which makes impossible to set chart properties like "fill: false".
In ChartJs 2.0 this is (line 2626)
fill: line.custom && line.custom.fill ? line.custom.fill : (this.getDataset().fill !== undefined ? this.getDataset().fill : this.chart.options.elements.line.fill),
The text was updated successfully, but these errors were encountered: