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

Sparkline style

3 Answers 118 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 10 Feb 2010, 07:07 PM
Hello,
I recently read the excellent  book "Next-Generation Business Intelligence Software with Silverlight 3"

http://www.amazon.com/Next-Generation-Business-Intelligence-Software-Silverlight/dp/1430224878

I am trying to incorporate some of things i learned into my existing application.  Much of the sample code was against Silverlight Toolkit and not Telerik charts.  I am trying to port some of the styles from toolkit to telerik.  I have figured out many of them but not all. 

Basically the chart is a word sized, sparkline that contains 2 line series.  I am hoping someone can share the xaml for:

1.  Set the StrokeThickness, Opacity and StrokeDashArray of a line series definition
2.  Turn off showing datapoints.
3.   For x axis, set the height and opacity.
4.  for the Y axis, set opacity, min, max.
5.  have the chart background be equal to whatever container it is in.  In my case, the chart is within a cell within a datagrid.

Below my signature, i have pasted the Silverlight Toolkit xaml for the styles.

Dan

              
            <!--Hide the border edges-->
            <chartingToolkit:Chart.Template>
                <ControlTemplate TargetType="chartingToolkit:Chart">
                    <chartingPrimitivesToolkit:EdgePanel x:Name="ChartArea">
                        <Grid Canvas.ZIndex="-1"></Grid>
                    </chartingPrimitivesToolkit:EdgePanel>
                </ControlTemplate>
            </chartingToolkit:Chart.Template>
            <!--Format the axes for a sparkline-->
            <chartingToolkit:Chart.Axes>
                <chartingToolkit:DateTimeAxis Orientation="X" MaxHeight="1" Opacity="0"/>
                <chartingToolkit:LinearAxis Orientation="Y" Opacity="1" Minimum="0" Maximum="10"/>
            </chartingToolkit:Chart.Axes>

 

 

  <!--DataPointStyle-->
                <chartingToolkit:LineSeries.DataPointStyle>
                    <Style TargetType="Control">
                        <!---->
                        <Setter Property="Visibility" Value="Collapsed"/>
                        <!---->
                        <Setter Property="Background" Value="Black"/>
                    </Style>
                </chartingToolkit:LineSeries.DataPointStyle>

                <!--use dashes for reference line-->
                <chartingToolkit:LineSeries.PolylineStyle>
                    <Style TargetType="Polyline">
                        <!---->
                        <Setter Property="Opacity" Value="0.75"/>
                        <!---->
                        <Setter Property="StrokeDashArray" Value="2"/>
                        <!---->
                        <Setter Property="StrokeThickness" Value="0.75"/>
                    </Style>
                </chartingToolkit:LineSeries.PolylineStyle>

                <!--DataPointStyle-->
                <chartingToolkit:LineSeries.DataPointStyle>
                    <Style TargetType="Control">
                        <!---->
                        <Setter Property="Visibility" Value="Collapsed"/>
                        <!---->
                        <Setter Property="Background" Value="Black"/>
                    </Style>
                </chartingToolkit:LineSeries.DataPointStyle>

                <!--use dashes for reference line-->
                <chartingToolkit:LineSeries.PolylineStyle>
                    <Style TargetType="Polyline">
                        <!---->
                        <Setter Property="StrokeThickness" Value="0.75"/>
                    </Style>
                </chartingToolkit:LineSeries.PolylineStyle>





3 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Milev
Telerik team
answered on 16 Feb 2010, 11:51 AM
Hello Dan,

This help topic might just help for most of the questions.

Best wishes,
Vladimir Milev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Dan
Top achievements
Rank 1
answered on 16 Feb 2010, 02:17 PM
Thanks!
Dan
0
Carlos Serrano
Top achievements
Rank 1
answered on 12 Apr 2010, 08:33 AM
Dan,

I am looking for exactly the same information.
I guess the low level steps described in the documentation pointed out by the Telerik team are enough... though I have not done it yet. Have you been able to get an equivalent configuration to the one described in the "BI with SL3" book?

Thanks!
Carlos
Tags
Chart
Asked by
Dan
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Dan
Top achievements
Rank 1
Carlos Serrano
Top achievements
Rank 1
Share this question
or