I just wanna write a pie plot that display the numbers inside the pie in white.
Also change the legends order to match the pie, or else.
This is how is now:

How I need:

var plot1 = jQuery.jqplot ('gender_chart', [data], {
seriesDefaults: {
// Make this a pie chart.
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
showDataLabels: true,
dataLabelFormatString: '%#.2f%',
textColor: 'white'
}
},
seriesColors: ['#fb7601', '#365D98'],
legend: {
reverse:true,
position: 'top',
show:true,
location: 'e',
labels: {
fontColor: 'white',
textColor: 'white',
},
}
});
Change the label color / font using CSS. For pie chart, class is
.jqplot-data-label.Change jqPlot label CSS as per your requirement via class.
To remove decimal value remove line
dataLabelFormatString: '%#.2f%'from your code.%#.2finstructs chart to display the value with two decimal places, and the%at the end adds a percent sign to the end of the value.Example: