Scatter plot with percentage Axis in dimplejs

83 views Asked by At

I am trying to create a scatter plot with percentage axis. But its not working.

var chart = new dimple.chart(svg);
                var x = chart.addCategoryAxis("x", "Fruit");
                var y1 = chart.addPctAxis("y", "Value");
                var y2 = chart.addPctAxis("y", "Value");
                var s1 = chart.addSeries("Year", dimple.plot.bubble, [x, y1]);
                s1.data = [
                    { "Value" : 10, "Fruit" : "Grapefruit", "Year" : 2012 },
                    { "Value" : 40, "Fruit" : "Apple", "Year" : 2012 },
                    { "Value" : 12, "Fruit" : "Banana", "Year" : 2012 }
                ];
                var s2 = chart.addSeries("Year", dimple.plot.bubble, [x, y2]);
                s2.data = [
                    { "Value" : 11, "Fruit" : "Grapefruit", "Year" : 2013 },
                    { "Value" : 30, "Fruit" : "Apple", "Year" : 2013 },
                    { "Value" : 14, "Fruit" : "Banana", "Year" : 2013 }
                ];
                chart.draw();

Below is the jsfiddle link: http://jsfiddle.net/chetan119/NCW89/142/

1

There are 1 answers

0
Umesh Maharshi On

Change addPctAxis to addMeasureAxis.

Reference : example