I'm generating to create a chart in dojocharts that is like a bar chart but uses triangles instead of rectangle bars (ie the longer the triangle the bigger the value it represents).I have creating a traingular chart using an area chart by some ugly code.Here my X-axis label name not showing correctly.So if adjust it with 0 values ,then it shows all name of x-axis values. I was wondering if something closer to what I need exists so I don't have to plot these fake 0 values.I need this triangle shape chart instead of bar.Here is my jsfiddle link [http://jsfiddle.net/kairi/UxNZD/].
Here is my code for triangle chart...
require(["dojox/charting/Chart", "dojox/charting/themes/Claro", "dojox/lang/functional/object", "dijit/registry",
"dojo/on", "dojo/dom", "dojo/_base/event", "dojo/parser", "dojox/charting/axis2d/Default",
"dojox/charting/plot2d/Areas", "dojox/charting/plot2d/Grid", "dojo/domReady!"],
function( Chart, Claro, on, dom, baseEvent, parser) {
// Create the base chart
chart = new Chart("chart");
chart.setTheme(Claro);
chart.addAxis("x", {
fixLower: "major", natural: true, stroke: "grey",
majorTick: {stroke: "black", length: 4},
minorTick: {stroke: "gray", length: 2},
labels: [{"value":1,"text":"Green<br>View"},{"value":2,"text":"Purple"},{"value":3,"text":"Time<br>Residency"},{"value":4,"text":"Marina<br>Apartments"},{"value":5,"text":"Ivory"},{"value":6,"text":"Callidora"},{"value":7,"text":"Almeria"},{"value":8,"text":"Vastus"},{"value":20,"text":"Canary<br>Greens"},{"value":10,"text":"Terra"}],
font: "normal normal bold 13px Myriad Pro Light",
fontColor: "black"
});
chart.addAxis("y", {
vertical: true, min: 0, max: 100,
majorTickStep:10, minorTickStep: 1, stroke: "grey",
majorTick: {stroke: "black", length: 4},
minorTick: {stroke: "gray", length: 2}
});
chart.addPlot("default", {type: "Areas",gap:10,
lines:true,
areas: true,
// markers: true,
labels: true,
labelStyle:"inside",
fontColor: "black"});
chart.addSeries("Series A",
[0,55.5,0,0,37.5,0,0,40,0,0,90,0,0,42.5,0,0,62,0,0,82.5,0,0,72,0,0,42.5,0,0,50,0]
);
chart.render();
parser.parse();
});
I am not find any solution in dojo.So tell me how is it possible. Appreciate any help ..