frappe / charts

Simple, responsive, modern SVG Charts with zero dependencies
https://frappe.io/charts
MIT License
14.94k stars 718 forks source link

Pie Chart not rendered correctly under certain circumstances #117

Closed kevinjqiu closed 6 years ago

kevinjqiu commented 6 years ago

Expected Behaviour

Given the following data set

  data = {
    labels: ["A", "B", "C"],

    datasets: [
      {
        title: "Some Data", color: "light-blue",
        values: [3126.24, 1412, 8.5]
      }
    ]
  };

  chart = new Chart({
    parent: "#chart", // or a DOM element
    title: "My Awesome Chart",
    data: data,
    type: 'pie', // or 'line', 'scatter', 'pie', 'percentage'
    height: 250
  });

Expect the Pie chart to be like a pie...

Actual Behaviour

The rendered chart looks like someone cut the pie and scrambled the pieces:

image

Steps to Reproduce:

NOTE: Add a GIF/Screenshot if required.

Frappé Charts version: 0.0.7

achillesrasquinha commented 6 years ago

Hi, thanks for the issue! Duplicate of #108. Let's take it there.