Sign in to follow this  
dfilip

Disable Gradient

Recommended Posts

How do I disable gradient?  It seems to be turned on by default.  Below is the XML that I am using, which I don't think is explicitly enabling it.  Sorry if this is an obvious question, but I have not been able to find the XML element to turn off gradient, and all of my bars are shading from white to their specified colors.  For a single data series I can set 'plotGradientColor' to the same as the plot color, but that obviously will not work for multiple series.  I am using MSBar2D.swf.

Thanks.

<chart caption='Existing markets remain the focus for growth'
 connectNullData='1'
 xAxisName=''
 yAxisName=''
 bgColor='FFFFFF'
 canvasBordercolor='FFFFFF'
 showAlternateVGridColor='0'
 showValues='0'
 numberSuffix='%25'
 seriesNameInToolTip='0'
 toolTipBGColor='eda799'
 toolTipBorderColor='FFFFFF'
 borderColor='FFFFFF'
 >
 <styles>
  <definition>
  <style name='myToolTip' type='font' font='Arial' size='12' color='FFFFFF'/>
  </definition>
  <application>
  <apply toObject='ToolTip' styles='myToolTip' />
  </application>
 </styles>
 <categories>
  <category label='Work more closely with the private sector to maintain competitiveness'/>
  <category label='Ensure regulations are clear and stable'/>
  <category label='Work more closely with other nations to harmonise regulations'/>
  <category label='Place more emphasis on fairly enforcing existing regulations'/>
  <category label='Focus regulation on outcomes, not process'/>
  <category label='Make the representation of emerging economies in global bodies more equitable'/>
  <category label='Empower multi-lateral organisations to act as global regulators'/>
 </categories>
 <dataset seriesName="Insurers" color='dc5034' anchorBGColor='dc5034'>
  <set value='65'/>
  <set value='50'/>
  <set value='46'/>
  <set value='40'/>
  <set value='35'/>
  <set value='25'/>
  <set value='8'/>
 </dataset>
 <dataset seriesName="Banking & capital markets companies" color='eda799'>
  <set value='62'/>
  <set value='57'/>
  <set value='37'/>
  <set value='35'/>
  <set value='44'/>
  <set value='18'/>
  <set value='20'/>
 </dataset>
 <dataset seriesName="All financial services companies" color='93616e '>
  <set value='63'/>
  <set value='52'/>
  <set value='39'/>
  <set value='35'/>
  <set value='41'/>
  <set value='22'/>
  <set value='17'/>
 </dataset>
 <dataset seriesName="Global" color='dc5034' anchorBGColor='6f2c3e '>
  <set value='59'/>
  <set value='57'/>
  <set value='45'/>
  <set value='39'/>
  <set value='32'/>
  <set value='21'/>
  <set value='15'/>
 </dataset>
</chart> 

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Please try using plotGradientColor='' for the same.

Hope this helps. :)

Share this post


Link to post
Share on other sites

Not sure that I understand ... it looks like 'plotGradientColor' is an attribute of the <chart/> tag, and if I use it there, it does work if I set the <dataset/> 'color' attribute and the <chart/> 'plotGradientColor' to the same values when I have a single data set.

But the problem, as per my original post, is that I have multiple data sets, each a different color.  Therefore, how would I set the 'plotGradientColor' to match each <dataset/> 'color'?  Using 'plotGradientColor' as an attribute of <dataset/> does not appear to do anything.

Thanks in advance for any further clarification.  I am evaluating FusionCharts to replace the current charting package where I am working, and so far this has been the only major obstacle that I have not found a way to overcome.  However, it is a show-stopper as my client's branding does not permit gradient colors.

And I can't use Fusion Charts Free - which I believe does not have gradients - because one of the (several) reasons for looking for a new charting system is for export, which is one of the things that attracted me to Fusion Charts V3.

Thanks!

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

By default, most charts in FusionCharts suite have FFFFFF as the plot gradient color. In case you wish to use solid fills for the column (or area), you have to use the plotGradientColor attribute without any color defined for it, i.e. plotGradientColor=''

e.g :-

<chart plotGradientColor='' ....>

<set label='Jan' value='420000' color='FF0000'/>

<set label='Feb' value='910000' color='00FF00'/>

<set label='Mar' value='720000' color='0000FF'/>

....

</chart>

In all the charts, you can specify custom color for each data plot. This is done using the color attribute of <set /> element as under. The color has to be in hex code format (RRGGBB) without #.

<chart ....>

<set label='Jan' value='420000' color='FF0000'/>

<set label='Feb' value='910000' color='00FF00'/>

<set label='Mar' value='720000' color='0000FF'/>

....

</chart>

The attribute "color" of <dataset> element sets the color using which columns, lines, area of that data-set would be drawn. For column chart, you can specify a list of comma separated hex codes to get a gradient plot.

Please refer to the links belos for further details on the same:-

Ref.- http://www.fusioncharts.com/docs?/AttDesc/DataPlot.html

  http://www.fusioncharts.com/docs?/ChartSS/MSBar2D.html

Hope this helps. :)

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Glad that your issue is resolved.

Keep smiling and keep FusionCharting. :)

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