Question

http://jsfiddle.net/Jn4tT/

var data= [ {"a":2, "b":5,"c":3 },
            {"a":5, "b":15,"c":7 },
            {"a":1, "b":5,"c":7 } ];

chart1.addAxis("a");
chart1.addAxis("b");      
chart1.addAxis("c");

chart1.addSeries("min", {data: data[0]}, { fill: "blue" });
chart1.addSeries("max", {data: data[1] }, { fill: "blue" });
chart1.addSeries("Answered", {data: data[2]}, { fill: "blue" });

var tip = new Tooltip(chart1, "default", {
    text: function(o){                                
        console.log(o); //no axis to the current data point
    }
});

chart1.render();

I can get the chart to render if I remove the addAxis above, but no matter how I add axis, on a spider type chart, it throws a "can't find axis" error.

Without the axis, it doesn't look like I can set custom tooltips (only want to show the data point, not the series and axis title). And it doesn't look like I have control of the axis labels, fonts, maxlabelsize, etc.

Was it helpful?

Solution

This may be added as a feature in future versions of dojo, but currently after a lot of fighting with it. I cracked open the library and added custom code to handle this and a lot of other things. Basically, just opening the spider.js and common.js files used in generating the spider diagrams. Was able to wrap the labels in my own class's. And also inserted a title attribute for each with the desired label. Using an external tooltip library, I now have a lot of control over the tooltips in spider diagrams.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top