Issue #676 new

Donut chart does not render when one member of a two value data set is 0

Okal Otieno
created an issue

var scores = [['a', 64], ['b', 0]]; var score_plot = $.jqplot('score-chart', [scores], { seriesDefaults: { renderer:$.jqplot.DonutRenderer, rendererOptions: { startAngle: -90, }, lineWidth: 1.5, shadow: false, }, seriesColors:['#7b990e', '#b5e611'], grid: { 'background': 'transparent', 'borderWidth': 0, 'shadow': false, }, });

You can find a running version at http://www.flipp.me/sesh/stats/142

Comments (9)

  1. usman000000

    I have fixed this issue using a tweak....;) those points which have 0 values.... give them negligible small values...that their color wont appear in chart. i tried 0.005 and it works for me... :)

  2. usman000000

    Paul,

    Actual issue is not solved yet... but you can cover up the issue by giving very small value to that point that its color doesnot appear in chart .i tried 0.005 and it works for me... :)

  3. Lucas Ventura Carro

    I think that this bug is duplicated by: 464 and 546. But none of them has any comment. As told in both, is only for IE 8 or 7.

    An easier way to reproduce is:

    1. Take file 'examples\pie-donut-charts.html'

    2. In the first plot script, set all categories to 0, excepte one.

    3. Add in rendererOptions the option startAngle : -90.

    4. No pie will appear.

  4. Lucas Ventura Carro

    I want to add more information about it:

    • in version 0.9.7r635, using the option startAngle with sliceMargin greater than 1, works (although appears a little "emtpy" slice).

    • in version 1.0.8r1250 doesn't works anyway.

  5. Log in to comment