Recommended Posts

I create the following 2D Pie Chart  

image.png.f21ae4e88b08cc81079bb241be326908.png

I'm looking to do the following, but none of the formating options are responding.

1. The Green is Severity "5" and the Blue is Severity "4".  Can I change the color so that if Severity 4, color = orange, Severity 5 = Red

2. Can I move the value into the pie chart?  valuePosition='Inside' doesn't seem to work.

<chart
  theme="asi"
  caption='${w.caption!}'
  animation='0'
  bgAlpha='100'
  enableSmartLabels='1'
  manageLabelOverflow='1'
  useEllipsesWhenOverflow='0'
  showBorder='0'
  ShowZeroPies='1'
  showPercentValues='0'
  usedataplotcolorforlabels="0"
  decimals='0'
  pieRadius='75'
  startingAngle='90'
  valuePosition='Inside'
>

  <#-- FusionCharts data format: (values should sum to 100 for a
  percentage pie chart)
  <set label='XXXX' value='12' />
  <set label='YYYY' value='22' />
  ...
  -->

  <#assign path = '/response/content/projection' />

  <#if (x[path][0])??>
  <#list x[path] as r>
  <set label="${r.severity[0]!}" value="${r.count[0]!}" />
  </#list>
  <#else>
  <set label="" value="0" />
  <#-- Show an empty chart if there is no data -->
  </#if>
</chart>

Share this post


Link to post
Share on other sites

Hi James,

For your first query, we would suggest you to provide color to the individual data objects to set the data plot/ slice color as per your requirement.

And for the second query, please set "valueposition='inside'" to place the values inside the pie chart as desired.

Please refer to this link for the implementation: http://jsfiddle.net/31acnkfs/

Kindly implement the above sample and if you still face the issue, please replicate the same in the above sample and share with us.

Please refer to these links for further information:-

Color individual data plots: https://www.fusioncharts.com/dev/chart-guide/chart-configurations/data-plot#color-individual-data-plots

Place values inside the Pie chart: https://www.fusioncharts.com/dev/chart-guide/standard-charts/pie-and-doughnut-charts#place-values-inside-the-pie-doughnut-chart

Hope this will help.

Thanks,

Srishti

Share this post


Link to post
Share on other sites

If you take a look at my code above, you'll see that I'm using valueposition='inside'.  I simplified my chart and it's still not working.  Was there a version that "valueposition='inside'" was introduced in?

<chart caption='TEST' animation='0' bgalpha='100' enablesmartlabels='1' managelableoverflow='1' useellipseswhenoverflow='0' showBorder='0' showzeropies='1' showpercentvalues='0' usedataplotcolorforlabels='0' decimals='0' pieRadius='50' startingAngle='0' valueposition='inside' showValues='1'>

Share this post


Link to post
Share on other sites

Hi James,

We tried replicating the issue in Pie2d sample using your chart configurations with the latest(v3.15,2) version of FusionCharts: https://jsfiddle.net/n9br37kt/

Please note, "valuePosition" feature was introduced in the version 3.14.0 and this feature will not work in the earlier versions.

Kindly upgrade to the latest version of FusionCharts and if you still face the issue, please replicate the same in the above sample and share with us.

Documentation link for reference : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/data-values#pie-doughnut-chart

Hope this will help.

Thanks,

Srishti

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now