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 is not drawn (is it due to decimal points?) #186

Closed Mashiane closed 5 years ago

Mashiane commented 6 years ago

Expected Behaviour

The pie chart to draw on the page

Actual Behaviour

Nothing is drawn except the legends on the chart

Steps to Reproduce:

Here is a pen for it: https://codepen.io/anele-mash-mbanga/pen/aKYzQP

let chart = new frappe.Chart("#fcjobs", { data: { labels: ['Female','Male','PDI','PWD','Semi Skilled','Skilled','Un Skilled','Youth','Jobs'], datasets: [{name: 'Jobs Created', values: [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,32.0]}] }, title: 'Jobs Created', type: 'pie', colors: ['#f44336','#e91e63','#9c27b0','#673ab7','#3f51b5','#2196f3','#03a9f4','#00bcd4','#009688'], height: 500, isNavigable: 0, valuesOverPoints: 1, barOptions: { stacked: 0 }, lineOptions: {dotSize: 4, hideLine: 0, hideDots: 0, heatline: 0, areaFill: 0 }, axisOptions: { yAxisMode: 'span', xAxisMode: 'span', xIsSeries: 0 }, maxLegendPoints: 20, maxSlices: 10,
barOptions: { height: 20, depth: 2}, discreteDomains: 1 });

NOTE: Add a GIF/Screenshot if required. jobscreated

Frappé Charts version: 1.1

scmmishra commented 5 years ago

Fixed in a recent PR, I am closing the issue.