Sign in to follow this  
Howard Fore

Line Annotations On Linear Gauge

Recommended Posts

Hi,

 

How do I get line annotations to show on my h linear gauge? See XML below:

 

<Chart

editMode='0'

bgColor='FFFFFF'

bgAlpha='0'

showBorder='0'

upperLimit='6.6'

lowerLimit='-8.52'

numberSuffix='%'

gaugeRoundRadius='5'

chartBottomMargin='30'

ticksBelowGauge='0'

placeTicksInside='0'

showGaugeLabels='0'

chartLeftMargin='25'

chartRightMargin='30'

majorTMColor='868F9B'

majorTMHeight='10'

majorTMThickness='2'

majorTMNumber='0'

minorTMNumber='0'

showToolTip='0'

decimals='2'

>

 

<colorRange>

<color minValue='-8.52' maxValue='-0.25' code='ffffff' />

<color minValue='-0.25' maxValue='4.54' code='C8D8EB' />

<color minValue='4.54' maxValue='6.6' code='ffffff' />

</colorRange>

 

<pointers>

<pointer value='3.97'

borderAlpha='100'

bgColor='FFC000'

borderColor='FFC000'

toolText='3 Month Average'

pointerOnTop='0'

pointerRadius='14'

pointerBgAlpha='100'

pointerBgColor='FFC000'

pointerBorderThickness='2'/>

</pointers>

 

 

<annotations>

<annotationGroup id='Grp1' showBelow="0">

<annotation type='line' x='175' y='160' toX='200' color='000000' />

<annotation type='line' x='215' y='155' toX='200' toY='160' color='000000' />

<annotation type='line' x='215' y='165' toX='200' toY='160' color='000000' />

</annotationGroup>

</annotations>

 

 

</Chart>

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

First of all, we would like to thank you for choosing FusionCharts as your charting solution component.

 

Please find the modified XML attached for your reference.

 

Hope this helps.smile.gif

HLinear.xml

Share this post


Link to post
Share on other sites

The programming concept of adding and showing line annotation on linear gauge is similar with line annnotation add-on to raster image file:

 

Private Sub button1_Click(sender As Object, e As EventArgs)

Dim obj As LineAnnotation = AnnotationGenerator.CreateLineAnnotation(60F, 45F, 560F, 228F)
'create a new LineAnnotation with start and end point
obj.LinePen = PenGenerator.CreateLinePen(Color.Blue, 5F)
'set line color and width
'set line startcap
obj.LinePen.StartCap = New RasterEdge.Imaging.Annotation.Basic.LineCap()
obj.LinePen.StartCap.Cap_Width = 2F
'set startcap width
obj.LinePen.StartCap.CapStyle = RasterEdge.Imaging.Annotation.LineCapStyle.Diamond
'set startcap style
'set line endcap
obj.LinePen.EndCap = New RasterEdge.Imaging.Annotation.Basic.LineCap()
obj.LinePen.EndCap.Cap_Width = 10F
obj.LinePen.EndCap.CapStyle = RasterEdge.Imaging.Annotation.LineCapStyle.Rectangle

Dim folderName As String = "C:/"
Dim img As Bitmap = obj.CreateAnnotation()
img.Save(folderName & "LineAnnotation.png")
End Sub

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