gauravkumar13337 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Pie Chart with a single serie is not rendered in Android #602

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This code works well on Desktop Chrome but is not rendered in Android >= 2.1 . 
I can only see the rendered label, nothing else.
    var chartData1 = [
        { label: "correct",  data: 10}
    ];

    // Render the pie chart
    $.plot($('#holder'), chartData, 
        {
            series: {
                pie: { 
                    show: true,
                    }
                }
            },
            legend: {
                show: false
        }
    });

When i add a second serie, graph is rendered correctly algain

Original issue reported on code.google.com by tran.binhan on 20 Sep 2011 at 4:47

Attachments:

GoogleCodeExporter commented 8 years ago
Correct the code: the variable's name should be chartData

var chartData = [
        { label: "correct",  data: 10}
    ];

    // Render the pie chart
    $.plot($('#holder'), chartData, 
        {
            series: {
                pie: { 
                    show: true,
                    }
                }
            },
            legend: {
                show: false
        }
    });

Original comment by tran.binhan on 20 Sep 2011 at 4:47

GoogleCodeExporter commented 8 years ago
After further investigation, i think android has same proble as ie with the 
full circle. need to subtract the angle a little bit 

Original comment by tran.binhan on 20 Sep 2011 at 11:34

GoogleCodeExporter commented 8 years ago
What a coincidence! I've been looking into that with a debugger today and have 
finally found the culprit. You are absolutely right - WebKit on Android suffers 
from the same issue as desktop IE. Beats me why none noticed this before.

Patch attached. I've verified it on desktop Chrome and Safari and it doesn't 
affect these, but solves the issue on Android.

Original comment by luk...@szmit.eu on 21 Sep 2011 at 11:11

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 8 May 2012 at 12:23

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 4 Jun 2012 at 8:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The solution you proposed makes the graph to render in Android also with a 
single serie BUT plothover and plotclick don't work properly (es. on plothover 
there is no highlight of the graph)...

Did you noticed this?

Any suggestion to solve it definitely?

Original comment by erindall...@gmail.com on 28 Aug 2012 at 1:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks a lot! Saved my day.

Original comment by Suha...@icrglabs.com on 17 Sep 2012 at 11:45