Different color on horizontal zero axis

3 posts, 0 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 02 Feb 2015 Link to this post

    Hi!

    I have a chart that displays both positive and negative values in line and bar series.
    The horizontal lines that are displayed on the vertical axis accross the chart are very soft as default, and I would like too keep it that way, but is there any way I can style just the zero value line to make it stand out more?

    See attached image.

    Regards,
    Håkan
  2. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 02 Feb 2015 in reply to Håkan Link to this post

    I found one solution myself, but if there is a better one, please let me know.
    I added an annotation like this:

    <telerik:RadCartesianChart.Annotations>
                    <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=VerticalAxis}" Value="0" StrokeThickness="1" Stroke="Black" />
                </telerik:RadCartesianChart.Annotations>

    Regards,
    Håkan
  3. DevCraft banner
  4. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 03 Feb 2015 Link to this post

    Hi Håkan,

    The applied solution is the right way to achieve your requirement. If you have any further questions, please let us know.

    Regards,
    Martin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top