mattosaurus / ChartJSCore

Implementation of Chart.js for use with .NET Core.
GNU General Public License v3.0
116 stars 34 forks source link

Howto use {x: val_X, y: val_Y} format for data? #58

Closed bairog closed 4 years ago

bairog commented 4 years ago

Hello. According to this the only way to use horizontalBar chart mixed with line is to use {x: val_X, y: val_Y} format for data. Howto use it with ChartJSCore?

mattosaurus commented 4 years ago

Hi, unfortunatly this isn't possible with ChartJSCore as at the moment, the Data object just accepts an IList<double?>. This doesn't seem to be offically supported in chart.js either with the method provided being a workaround, I don't really want to change this to IList<object?> as that feels a bit too open but I'll have a think if there's a better way of doing it.

Feel free to submit a PR if you can think of a more elegant way of doing it or alternatly you could just clone the project and update it to IList<object?> in your local version.