0
votes

I have created a bar chart with single series item. xField of my series is "MEASURE" and yField is "ITEM_DESC".

Now my dataSource to the chart has got two data items:

  1. item[0]: MEASURE = 100 and ITEM_DESC = MyItem
  2. item[1]: MEASURE = 200 and ITEM_DESC = MyItem

When this bar chart is plotted, I see two nodes at Y Axis but graph is rendered on top of each other. So effectively I see two Y Axis nodes but only one bar with two data points. I understand bar chart is finding it difficult to differentiate between two same Y Axis items but is there a way I can plot two different bars in this situation?

All suggestions are welcome!

1

1 Answers

0
votes

One series of items shall be a 'function' - for each 'x' value you can have only one 'y' value.

In this situation you can place those items to different series and then set ColumnChart's 'type' property to one of the "clustered|overlaid|stacked|100%" to specify how your two items shall be combined.

Otherwise, you can calculate custom positions for your items and implement your own itemrenderer that ignores values received in move() and setActualSize() methods and uses your custom positions instead.