I want to format the default tooltip of pie to this:
<SeriesName>
<value> out of <total value> //=== but I want this on zero decimal places format (eg.: 2 out of 10)
while the point label is in percentage with 2 decimal places (eg: 14.29%)
my code is:
Chart;
function LoadChart() {
Chart = new cfx.Chart();
Chart.setGallery(cfx.Gallery.Pie);
Chart.getAnimations().getLoad().setEnabled(true);
Chart.getLegendBox().setVisible(false);
var allSeries = Chart.getAllSeries();
var myPie = (Chart.getGalleryAttributes());
var pointLabels = allSeries.getPointLabels();
//myPie.setExplodingMode(cfx.ExplodingMode.All);
//myPie.setSquare(true);
Chart.getAxisY().getDataFormat().setDecimals(2);
myPie.setMaximumLabelMargin(0);
pointLabels.setVisible(true);
myPie.setLabelsInside(true);
pointLabels.setFormat("%p%%");
Chart.getAllSeries().getPointLabels().setRichText(true);
Chart.setDataSource(result);
Chart.getPlotAreaMargin().setTop(0);
Chart.getPlotAreaMargin().setBottom(0);
Chart.getPlotAreaMargin().setRight(0);
Chart.getPlotAreaMargin().setLeft(0);
var divHolder = document.getElementById('divChart');
Chart.create(divHolder);
}