You need to sign in to do that
Don't have an account?
RarLopz
Visualforce Charting - Chart looks different than sample example
Why does my chart has month names on wedges but the sample example doesn't ?
In my sandbox I copied and pasted exact code from the salesforce documentation as shown here https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting_overview_simple_example.htm
Created a Apex Controller, Created a Wrapper Class, Created a VFP.
The output as shown in this example doesn't have month names on the wedges. However the output I get has month names on the wedges. This example doesn't uses rendererFn property. I am wondering why i see month names and the example shown does'nt?
This is my output
However I was expecting to see this
Here the Code exactly as copied from the documentation
In my sandbox I copied and pasted exact code from the salesforce documentation as shown here https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting_overview_simple_example.htm
Created a Apex Controller, Created a Wrapper Class, Created a VFP.
The output as shown in this example doesn't have month names on the wedges. However the output I get has month names on the wedges. This example doesn't uses rendererFn property. I am wondering why i see month names and the example shown does'nt?
This is my output
However I was expecting to see this
Here the Code exactly as copied from the documentation
<apex:page controller="PieChartController" title="Pie Chart"> <apex:chart height="350" width="450" data="{!pieData}"> <apex:pieSeries dataField="data" labelField="name"/> <apex:legend position="right"/> </apex:chart> </apex:page> public class PieChartController { public List<PieWedgeData> getPieData() { List<PieWedgeData> data = new List<PieWedgeData>(); data.add(new PieWedgeData('Jan', 30)); data.add(new PieWedgeData('Feb', 15)); data.add(new PieWedgeData('Mar', 10)); data.add(new PieWedgeData('Apr', 20)); data.add(new PieWedgeData('May', 20)); data.add(new PieWedgeData('Jun', 5)); return data; } // Wrapper class public class PieWedgeData { public String name { get; set; } public Integer data { get; set; } public PieWedgeData(String name, Integer data) { this.name = name; this.data = data; } } }
You need to use apex:chartLabel tag to remove the label.
After using this your code will be something like this below.
Hope this helps.
All Answers
You need to use apex:chartLabel tag to remove the label.
After using this your code will be something like this below.
Hope this helps.