Sign in to follow this  
SolKlein

Pie2D Chart Label Problems

Recommended Posts

I posted this also in the PHP section but this is more of a general question.

 

I'm running the latest version 3.2.1 and am having an issue with labels on the 2D Pie charts. The flash version render correctly and the JavaScript (HighCharts) version

renders differently. Making the labels unreadable/unusable. I'm attaching screenshots of both. Both are fed from the same XML data.

 

Any thoughts on how to change the JS output to match the Flash version?

 

Thanks!

 

XML Data:

 

<chart caption='Total Process Code Breakdown' subcaption='From 01/01/2010 to 12/31/2010' xAxisName='Process Code' yAxisName='Count' numberPrefix=''>

<set label='None' value='13' />

<set label='Sales' value='4' />

<set label='Shipping/Receiving' value='8' />

<set label='Purchasing' value='7' />

<set label='Manufacturing' value='14' />

<set label='Quality Control' value='5' />

</chart>

post-10251-021511800 1287339571_thumb.jpg

post-10251-004309200 1287339584_thumb.jpg

Share this post


Link to post
Share on other sites

Unfortunately, this is not possible until HighCharts 2.1 comes out (which is in beta now). You could hack it, but it would involve modifying the highcharts.js file (which might be a violation of your license).

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

I'm running the latest version 3.2.1 and am having an issue with labels on the 2D Pie charts. The flash version render correctly and the JavaScript (HighCharts) version

renders differently. Making the labels unreadable/unusable. I'm attaching screenshots of both. Both are fed from the same XML data.

 

Any thoughts on how to change the JS output to match the Flash version?

 

This is a known issue of JavaScript charts.

 

There is a workaround that allows you to specifically adjust your JS charts to suit your needs and bridge differences between the flash charts.

 

For every flash chart, there is an internal method called _overrideJSChartConfiguration that accepts HighCharts configuration as parameter. This configuration overrides the default configuration of the JS charts.

 

The sample code is as below:

if (typeof chartObject._overrideJSChartConfiguration === 'function') {

chartObject._overrideJSChartConfiguration({

// provide highcharts configuration here...

});

}

 

For the HighCharts configuration reference, please check the link mentioned below :-

Ref: http://www.highcharts.com/ref/

 

I hope this helps.

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
Sign in to follow this