Sign in to follow this  
axis1048

How do I create linear gauge chart with two pointers?

Recommended Posts

My original XML Looked like this

----------------------------------------------------------------------------------------------------

- <chart lowerLimit="1" upperLimit="5" numberSuffix="" showTickMarks="1" majorTMHeight="0" minorTMHeight="0" majorTMColor="666699" majorTMNumber="5" showTickValues="1" decimalPrecision="1" tickMarkGap="5" baseFontColor="666699" pointerSides="3" pointerRadius="16" pointerBGColor="D5D5E3" pointerBorderThickness="5" pointerBorderColor="666699" chartRightMargin="20" chartBottomMargin="0" realTimeValueFontSize="10">

- <colorRange>

 <color minValue='1' maxValue='2' code='ff8a01' />

 <color minValue='2' maxValue='3' code='fff701' />

 <color minValue='3' maxValue='4' code='ceec01' />

 <color minValue='4' maxValue='5' code='92d001' />

  </colorRange>

<value>4.6</value>

- <customObjects>

- <!--  Draw the gradiented rectangle and its shadow to cover up the linear gauge chart already drawn

  -->

- <!--  And also match the starting points of the rectangle with the linear chart for the tick marks to be in place

  -->

- <objectGroup xPos="0" yPos="0" showBelowChart="0">

  <object xpos="3" ypos="0" toxpos="238" toypos="18" type="rectangle" fillColor="333333" radius="0" />

  <object xpos="3" ypos="0" toxpos="237" toypos="17" type="rectangle" fillAsGradient="1" fillColor="ff8a01, fff701,ceec01,92d001" fillAlpha="100,100,100,100" fillRatio="20,20,25,35" radius="0" />

- <!-- Labels with their shadows

  -->

  </objectGroup>

  </customObjects>

  </chart>

------------------------------------------------------------------------------------------------

To the above I wanted to add one more pointer with value 4.0, so according to what you said, i have modified the above to :

----------------------------------------------------------------------------------------------------

- <chart lowerLimit="1" upperLimit="5" numberSuffix="" showTickMarks="1" majorTMHeight="0" minorTMHeight="0" majorTMColor="666699" majorTMNumber="5" showTickValues="1" decimalPrecision="1" tickMarkGap="5" baseFontColor="666699" pointerSides="3" pointerRadius="16" pointerBGColor="D5D5E3" pointerBorderThickness="5" pointerBorderColor="666699" chartRightMargin="20" chartBottomMargin="0" realTimeValueFontSize="10">

- <colorRange>

 <color minValue='1' maxValue='2' code='ff8a01' />

 <color minValue='2' maxValue='3' code='fff701' />

 <color minValue='3' maxValue='4' code='ceec01' />

 <color minValue='4' maxValue='5' code='92d001' />

  </colorRange>

<dials>

<dial value='4.6' />

<dial value='4.0' />

</dials>

- <customObjects>

- <!--  Draw the gradiented rectangle and its shadow to cover up the linear gauge chart already drawn

  -->

- <!--  And also match the starting points of the rectangle with the linear chart for the tick marks to be in place

  -->

- <objectGroup xPos="0" yPos="0" showBelowChart="0">

  <object xpos="3" ypos="0" toxpos="238" toypos="18" type="rectangle" fillColor="333333" radius="0" />

  <object xpos="3" ypos="0" toxpos="237" toypos="17" type="rectangle" fillAsGradient="1" fillColor="ff8a01, fff701,ceec01,92d001" fillAlpha="100,100,100,100" fillRatio="20,20,25,35" radius="0" />

- <!-- Labels with their shadows

  -->

  </objectGroup>

  </customObjects>

  </chart>

----------------------------------------------------------------------------------------------------

Now the chart looks like this

b5766aca-c7c5-49e8-8059-f5b2.jpg

I have tried adding two <value>4.6</value><value>4.0</value>, but it shows only the later.

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