This is a migrated thread and some comments may be shown as answers.

Stick Series

1 Answer 51 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 21 Jun 2013, 07:11 AM
Hi,
Does anyone know how to create a basic stick series whereby a stick is painted from each point to the x-axis baseline?

Thanks,
Dave.

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 25 Jun 2013, 02:02 PM
Hi Dave,

Does the BarSeries class provide the visualization you need? You can make them thinner by explicitly setting the width of the PointTemplate like this:
<telerik:RadCartesianChart.Series>
    <telerik:BarSeries>
        <telerik:BarSeries.PointTemplate>
            <DataTemplate>
                <Border Background="Red" Width="10"/>
            </DataTemplate>
        </telerik:BarSeries.PointTemplate>

If you want to use stick series in a scatter scenario, you can use PointSeries with the following PointTemplate:
<telerik:ScatterPointSeries>
    <telerik:ScatterPointSeries.PointTemplate>
        <DataTemplate>
            <Canvas Width="1000000" Height="1000000">
                <Border Background="LightBlue"
                      Width="20"
                      Height="1000000"
                      Margin="499990 500000 0 0"
                      VerticalAlignment="Bottom"/>
            </Canvas>
        </DataTemplate>
    </telerik:ScatterPointSeries.PointTemplate>

(Note that this workaround will work, only if all YValues are >=0).

I hope this helps. 

Regards,
Petar Kirov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
David
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or