Arindam

Changing area colors in Combi area/line chart

Recommended Posts

I have created a MSCombi2D chart and am attempting to change the colors of the plot areas. I have tried everything, including reading the online documentation of course, but have not been successful. Could you please edit the code below to show me how to specify the area color for each of the area ranges of data? (I successfully changed the line color of one dataset, but not the area color of the others). Many thanks. James

<chart caption="Weight - Age" subcaption="Boys" xaxisname="Months" 
yaxisname="Kgs" palette="1" showValues='0' numDivLines='10' showAlternateHGridColor='0'
numVDivLines='36' showAlternateVGridColor='0' drawAnchors='0' connectNullData='1'>
<categories>
 <category label="0" />
 <category label="0.5" />
 <category label="1.5" />
 <category label="2.5" />
 </categories>
 
 <dataset SeriesName="P5" renderas="Area">
 <set value="2.52690402" />
 <set value="2.964655655" />
 <set value="3.774848862" />
 <set value="4.503255345" />
 </dataset>

 <dataset SeriesName="P10" renderas="Area">
 <set value="2.773801848" />
 <set value="3.209510017" />
 <set value="4.020561446" />
 <set value="4.754479354" />
 </dataset>

 <dataset SeriesName="P50" lineThickness="3" color='333333' showValues='0' drawAnchors='1' renderas="Line">
 <set value="3.530203168" />
 <set value="4.003106424" />
 <set value="4.879525083" />
 <set value="5.672888765" />
 </dataset>

 <dataset SeriesName="P75" renderas="Area">
 <set value="3.879076559" />
 <set value="4.387422565" />
 <set value="5.327327567" />
 <set value="6.175598158" />
 </dataset>
 
</chart>

Share this post


Link to post
Share on other sites

Hi,

Could you please use dataset's color attribute?

<dataset SeriesName="P75" renderas="Area" color="0000FF">

  <set value="3.879076559" />

  <set value="4.387422565" />

  <set value="5.327327567" />

  <set value="6.175598158" />

  </dataset>

Share this post


Link to post
Share on other sites

I think I have found the problem: I had thought that it was a stacked area chart + a line. It is actually an area chart with a line, therefore when I have multi-series area data, the colors of the plot areas all blend together (which I don't want). So, can you tell me if you have a combination chart consisting of a stacked area + line? And if you don't, could you develop one and how long would that take?

Many thanks.

James

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