charts
charts copied to clipboard
Pie Chart Problem
Expected Behaviour
Actual Behaviour
The pie chart doesn't work so well...
<div id="chart"></div>
<script>
new Chart("#chart", {
// or DOM element
data: {
labels: [
"Person A",
"Person B",
"Person C",
],
datasets: [{
name: "Some Data",
chartType: "pie",
values: [2000, 1000, 100,]
}, ],
},
title: "My Awesome Chart",
type: "pie", // or 'bar', 'line', 'pie', 'percentage'
height: 300,
colors: ["purple", "#ffa3ef", "light-blue"],
axisOptions: {
xAxisMode: "tick",
xIsSeries: true
},
barOptions: {
stacked: false,
spaceRatio: 0.5
},
tooltipOptions: {
formatTooltipX: (d) => (d + "").toUpperCase(),
formatTooltipY: (d) => d + " pts"
}
});
</script>
Steps to Reproduce:
NOTE: Add a GIF/Screenshot if required.
Frappé Charts version: Codepen / Codesandbox:
the version 1.6.2 is ok.you can try it