This is my first question.
I need to format jqPlot chart point labels as follows: 50 (100%) Formation of the number and percentage of display.
var s1 = [32, 28, 18, 6];
var ticks = ['0-20 kph', '21-40 kph', '41-60 kph', '61+ kph'];
plot1 = $.jqplot('bar-graph', [s1], {
animate: !$.jqplot.use_excanvas,
title: 'Gráficos de velocidade',
captureRightClick: true,
seriesColors: ['green', 'yellow', 'orange', 'red'],
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
pointLabels: {
show: true,
formatString: '%s (?%%)'
},
rendererOptions: {
varyBarColor: true
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks
}
},
highlighter: {
show: false
}
});
In jsFinddle: http://jsfiddle.net/evandroprogram/r3PUE/10/
Thank.
source
share