I am plotting Vertical Grouped Bar Chart
aus einer CSV-Datei, die Rabatt, Bewertung und Klicks enthält. Die Daten sind csv ist wie 55,2,1 und 40,5,0 etc. Hier sind der erste Wert (55,40) die Rabatte, (2,5) Bewertung und 1 und 0 entsprechen clicked
bzw. not clicked
. Beim Plotten des Diagramms mit folgendem Code.DimpleJS. Y-Achse Werte in Prozent
var svg2 = dimple.newSvg("#discountContainer", 590, 400);
d3.csv("/svm1000.csv", function (data) {
var myChart2 = new dimple.chart(svg2, data);
myChart2.setBounds(60, 30, 510, 330)
myChart2.addCategoryAxis("x", ["rating", "action"]);
var y = myChart2.addMeasureAxis("y", "discount");
//y.tickFormat = "%";
myChart2.addSeries("action", dimple.plot.bar);
myChart2.addLegend(65, 10, 510, 20, "right");
myChart2.draw();
});
Das Problem ist, I y-Achse in Prozent in multiple of 10, like 0%, 10%, 20% .. 100%
darstellen wollen. Im Moment sind die y-Achsenwerte wie 0,2k,4k,6k...20k
. So, wie y-Achse in Prozent darzustellen.
dies ist nicht D3 ist es? – thatOneGuy
seine in dimpleJS, die auf D3 –
gebaut wird ok, wenn es etwas wie D3 ist, verwenden Sie Tickvalues (), viele Beispiele online – thatOneGuy