Bar Chart: setting legend names based on data

Hi,

for a Bar Chart I need to display, I do not know the legend names in advance, as they are part of the incoming JSON array.

For example, if I get:

[
{ device: “A”, day: “01”, value: 20 },
{ device: “B”, day: “01”, value: 30 },
{ device: “C”, day: “01”, value: 10 },
{ device: “A”, day: “02”, value: 50 },
{ device: “B”, day: “02”, value: 40 }
]

I’d like to create a Bar Chart with “day” in the X axis and “value” in the Y axis. Grouped bars per day.

The result of the above array would be http://s2.postimg.org/xep77h3i1/Screen_Shot_2015_12_31_at_11_30_48.png

Is this possible with 3.1 ?

Thanks

No, I’m afraid not. The point is that the legend/series correspondence based on the series order. Moreover, our charts require a different structure of the dataset:

http://webix.com/snippet/174e2533

http://docs.webix.com/desktop__chart_series.html

…and how about using the addView() method? I might create the underlying view object as per my needs, dynamically, and then add it to a current view element.

Thanks

This method can be used within the layout/multiview/form/accordion/any element that has inner views. Check the API and the snippet.