Sparkline Charts using Visifire
karthikIn this blog I’ll show how to create Sparkline Charts using Line charts from Visifire.
Let me start by showing a sample of the sparkline chart: ![]()
The following XML is a bare bone XML required to create sparkline charts:
<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=Visifire.Charts"
AnimationEnabled="False" Padding="1" BorderThickness="0" Watermark="False">
<vc:AxisX Enabled="False"/>
<vc:AxisY Enabled="False" StartFromZero="False"/>
<vc:DataSeries RenderAs="Line" LabelEnabled="False" MarkerEnabled="False" >
.
.
.
</vc:DataSeries>
</vc:Chart>
Highlighting of the various points has to be done by selecting the color for the marker.
To highlight any point you have to enable the marker for the point and set the color. If color is not selected then default color will be applied. Also set the marker size as per requirement. Have a look at the example below, it shows how to highlight the start and end points.
<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=Visifire.Charts" Theme="Theme1"
AnimationEnabled="False" Padding="1" BorderThickness="0" Watermark="False">
<vc:AxisX Enabled="False"/>
<vc:AxisY Enabled="False" StartFromZero="False"/>
<vc:DataSeries RenderAs="Line" LabelEnabled="False" MarkerEnabled="False"
MarkerSize="5" LineThickness="0.5" Color="Black">
<vc:DataPoint YValue="44.01" MarkerEnabled="True" Color="Blue" />
.
.
.
<vc:DataPoint YValue="44.5" MarkerEnabled="True" Color="Blue" />
</vc:DataSeries>
</vc:Chart>
Any point can be highlighted to show its importance
The screen shot below shows a HTML table containing Visifire sparkline charts, click on the image below to see silverlight example:
The code for this example can be downloaded from the here.
Visifire sparkline charts support all events that are supported by line charts and hence can be easily used for creating drill down charts.



Comments(2)



