Sign in to follow this  
gilligans

Horizontal Bullet Graph -coloring

Recommended Posts

Hi,

 

the bullet graph is almost black and white or grey shades

 

is there a way to i can create three different colors in xml..

 

 

 

currently the xml looks like this :

 

<chart palette="1" lowerLimit="0" upperLimit="300" canvasLeftMargin="120" caption="Revenue" subcaption="US $ (1,000s)" showBorder="0">

 

<colorRange>

 

<color minValue="0" maxValue="150"/>

 

<color minValue="150" maxValue="220"/>

 

<color minValue="220" maxValue="300"/>

 

</colorRange>

 

<value>260</value>

 

<target>250</target>

 

</chart>

 

 

 

Please help

 

gilligans

Share this post


Link to post
Share on other sites

var b2myChart10 = new FusionCharts('files/FusionCharts/HBullet.swf', 'b2myChart10', '100', '20', '0', '0');

 

b2myChart10.setDataXML("

 

<chart pallette='1' plotFillColor='00FF00' setAdaptiveYMin='0' showPlotBorder='0' showTickValues='0' lowerLimit='0' upperLimit='100' showBorder='0' showTickMarks='0' bgColor='FFFFFF'>

 

<colorRange>

 

<color minValue='0' maxValue='54.4444444444' color='FF0000' />

 

<color minValue='54.4444444444' maxValue='77.7777777778' color='00FF00' />

 

<color minValue='77.7777777778' maxValue='100' color='0000FF' />

 

</colorRange>

 

<value>

 

0

 

</value>

 

</chart>

 

"); b2myChart10.render('bchart10');

 

 

 

Above is my code and I expected a red band, green band, and a blue band - yet I get the standard grey bands.

 

 

 

I don't think specifying the colors in colorrange works.

 

 

 

Do you agree with my expectation?

post-230-128441564795_thumb.jpg

Share this post


Link to post
Share on other sites

Instead of color attribute, please use the code attribute as under:

 

 

 

<chart pallette='1' plotFillColor='00FF00' setAdaptiveYMin='0' showPlotBorder='0' showTickValues='0' lowerLimit='0' upperLimit='100' showBorder='0' showTickMarks='0' bgColor='FFFFFF'>

 

<colorRange>

 

<color minValue='0' maxValue='54.4444444444' code='FF0000' />

 

<color minValue='54.4444444444' maxValue='77.7777777778' code='00FF00' />

 

<color minValue='77.7777777778' maxValue='100' code='0000FF' />

 

</colorRange>

 

<value>0</value>

 

</chart>

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