Hi there
I have a small issue with a pie chart. It works fine. However when i set “showLabels: false” then it stops working. I would like to hide the labels on the chart slices but keeping the mouseover display.
Here’s my code:
var dataSource2 = [
{ Country: 'DE', Percentage: 23 },
{ Country: 'FR', Percentage: 20 },
{ Country: 'ES', Percentage: 15 },
{ Country: 'IT', Percentage: 10 },
{ Country: 'CH', Percentage: 8 },
{ Country: 'BE', Percentage: 7 },
{ Country: 'PT', Percentage: 5 },
{ Country: 'OTHERS', Percentage: 12 }
];
var settings2 = {
source: dataSource2,
enableAnimations: false,
colorScheme: 'scheme01',
borderColor: '#ffffff',
padding: { left: 0, top: 0, right: 0, bottom: 0 },
showLegend: true,
seriesGroups: [ {
type: 'pie',
showLabels: true,
series: [ {
dataField: 'Percentage',
displayText: 'Country',
labelRadius: 40,
initialAngle: 0,
radius: 50,
centerOffset: 7,
formatSettings: { sufix: '%', decimalPlaces: 1 }
} ]
} ]
};
$('#transactionPerCountryChart').jqxChart(settings2);
Thanks & cheers,
Peter