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

BulletGraph Styling

2 Answers 83 Views
BulletGraph
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 17 May 2011, 11:31 PM
Hi,

Is it possible to modify the appearance of the BulletGraph QualitativeRanges and/or FeaturedMeasure?
I would like to add gradient shading.

  • WPF version:  3.0.6920.4902
            (as per http://msdn.microsoft.com/en-us/library/aa349641.aspx)
  • OS:  Windows 7 Enterprise 64-bit
  • exact browser version:  IE9 v9.0.8112.16421
  • exact version of the Telerik product:  RadControls for WPF v2011.1.419.40
  • preferred programming language (VB.NET or C#):  C#


  • Thank you,
    - Martin

    2 Answers, 1 is accepted

    Sort by
    0
    Accepted
    Yavor
    Telerik team
    answered on 20 May 2011, 08:12 AM
    Hi Martin,

    Featured and projected measure, comparative measures and qualitative ranges all expose a Brush property that can be any kind of brush. You can add linear gradient brush easily using Visual Studio or Expression Blend build-in brush creator. Another option is to define them in xaml like this:

    <telerik:RadHorizontalBulletGraph Height="35" Width="300" FeaturedMeasure="60" ComparativeMeasure="75" Maximum="100">
        <telerik:RadHorizontalBulletGraph.FeaturedMeasureBrush>
            <LinearGradientBrush>
                <GradientStop Color="Aqua" Offset="0" />
                <GradientStop Color="DarkGoldenrod" Offset="1" />
            </LinearGradientBrush>
        </telerik:RadHorizontalBulletGraph.FeaturedMeasureBrush>
        <telerik:RadHorizontalBulletGraph.QualitativeRanges>
            <telerik:QualitativeRange Value="30">
                <telerik:QualitativeRange.Brush>
                    <LinearGradientBrush>
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="Red" Offset="1" />
                    </LinearGradientBrush>
                </telerik:QualitativeRange.Brush>
            </telerik:QualitativeRange>
            <telerik:QualitativeRange Value="60">
                <telerik:QualitativeRange.Brush>
                    <LinearGradientBrush>
                        <GradientStop Color="Red" Offset="0" />
                        <GradientStop Color="Blue" Offset="1" />
                    </LinearGradientBrush>
                </telerik:QualitativeRange.Brush>
            </telerik:QualitativeRange>
            <telerik:QualitativeRange>
                <telerik:QualitativeRange.Brush>
                    <LinearGradientBrush>
                        <GradientStop Color="Blue" Offset="0" />
                        <GradientStop Color="Green" Offset="1" />
                    </LinearGradientBrush>
                </telerik:QualitativeRange.Brush>
            </telerik:QualitativeRange>
        </telerik:RadHorizontalBulletGraph.QualitativeRanges>
    </telerik:RadHorizontalBulletGraph>

    Hope this helps!


    Greetings,
    Yavor Ivanov
    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
    Martin
    Top achievements
    Rank 1
    answered on 21 May 2011, 12:12 AM
    Yavor,
    Thank you for the directions and sample code, they both worked.

    My mistake was not digging far enough in Visual Studio 2010.  I looked for gradients under the "Brushes" group in the Properties window.  But for the QualitativeRange tag, Brush is under the "Other" group.  Once I found that, everything came together.

    Best regards,
    - Martin
    Tags
    BulletGraph
    Asked by
    Martin
    Top achievements
    Rank 1
    Answers by
    Yavor
    Telerik team
    Martin
    Top achievements
    Rank 1
    Share this question
    or