Vedmack

Pie2D : How To Control The Gradient Steps Of Chart Color

Recommended Posts

Hi

 

I'm drawing a simple pie2D chart with assigning special colors (getting the default ones)

 

I want to the chart to be with gradient color , but not like it comes as default - same color till almost the border , and in the end a major gradient ending ( which can be removed by setting use3DLighting into 0)

 

SO I wonder how can I control this gradient steps from center of the pie till the borders

 

 

Regards,

 

Daniel.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Can you please share a sample image of your requirement for better comprehension?

 

Also, please share the XML data.

Share this post


Link to post
Share on other sites

Here is a sample code

 

 

var chartData = {
   "chart": {
       "showlabels": 0,
       "showvalues": 0,
       "showLegend": 1,
       "legendPosition": "buttom",
       "bgAlpha": '0,0',
       "animation": 0,
       "interactiveLegend": 0,
       "enableRotation": 0,
       "enableSlicing": 0,
       "use3DLighting": 0
   },
   "data": [
       {
       "value": "243",
       "label": "USA"
		},
   {
       "value": "207",
       "label": "UK"
   },
   {
       "value": "82",
       "label": "Canada"
   },
   {
       "value": "65",
       "label": "France"
   },
   {
       "value": "175",
       "label": "Others"
   }
   ]
};

var chartReference = new FusionCharts("Pie2D", "my_chart_id", 300, 300, "0", "0");
chartReference.setJSONData(chartData);
chartReference.setTransparent(true);
chartReference.render("my_chart_container");

 

which produces the following image

post-28512-0-79923100-1354180091_thumb.png

Edited by Vedmack

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