Pie not displayed under ie with only 0% results

3 views
Skip to first unread message

Nicolas

unread,
May 6, 2009, 8:44:31 AM5/6/09
to plotkit
I'm able to display a pie without results (only 0 values) under
firefox but under IE i'm getting only a white space.
Any ideas ?

Thank you.

Extract of POC:
<div><canvas id="graph1" height="105" width="200"></canvas></div>
<script>


var options = {
"IECanvasHTC": "/plotkit/iecanvas.htc",
"padding": {left: 0, right: 0, top: 0, bottom: 0},
"xTicks": [{v:0, label:""},
{v:1, label:""},
{v:2, label:""},
{v:3, label:""},
{v:4, label:""}],
"drawYAxis": false,
"drawBackground": true,
"shouldStroke" : true
};

function drawGraph(dataset, name) {
var layout = new PlotKit.Layout("pie", options);
layout.addDataset("sqrt", dataset);
layout.evaluate();
var canvas = MochiKit.DOM.getElement(name);
var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout,
options);
plotter.render();
}

var dataset1=[[1,0]];
MochiKit.DOM.addLoadEvent(drawGraph(dataset1, "graph1"));

</script>

chertel

unread,
May 7, 2009, 12:48:54 PM5/7/09
to plotkit
What would you expect this to show?

I think a blank graph would be the expected result...

If you want all of them to be equal, you could possibly try setting
them all to 1 or something if they are 0...
Reply all
Reply to author
Forward
0 new messages