Zero align primary and secondary axes

Thread is closed for posting
2 posts, 0 answers
  1. Jesper Broe Rasmussen
    Jesper Broe Rasmussen avatar
    33 posts
    Member since:
    Mar 2007

    Posted 20 Dec 2007 Link to this post

    Is it possible to align zero for the primary Yaxis and zero for the seondary yaxis?
    The following code (taken from http://www.telerik.com/DEMOS/ASPNET/Prometheus/Chart/Examples/Functionality/Yaxis2/DefaultCS.aspx)  have a line series, which contains engative values, while the bar series does not.
    It would be convient if zero is positioned the same place for both the primary axis and the secondary.


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="Telerik.Charting, Version=1.6.2.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763"
        Namespace="Telerik.Charting" TagPrefix="telerik" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
     <telerik:RadChart ID="RadChart1" runat="server" Width="480px" Height="290px">
                <PlotArea>
                    <XAxis>
                    </XAxis>
                    <YAxis>
                    </YAxis>
                    <YAxis2>
                    </YAxis2>
                </PlotArea>
                <Series>
                    <telerik:ChartSeries Name="Series 1" Type="Line">
                        <Appearance>
                            <FillStyle MainColor="Blue">
                            </FillStyle>
                        </Appearance>
                        <Items>
                            <telerik:ChartSeriesItem YValue="-1" Name="Item 1">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="2" Name="Item 2">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="4" Name="Item 3">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="3" Name="Item 4">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="5" Name="Item 5">
                            </telerik:ChartSeriesItem>
                        </Items>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Name="Series 2" YAxisType="Secondary">
                        <Appearance>
                            <FillStyle MainColor="Red">
                            </FillStyle>
                        </Appearance>
                        <Items>
                            <telerik:ChartSeriesItem YValue="10" Name="Item 1">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="20" Name="Item 2">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="40" Name="Item 3">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="30" Name="Item 4">
                            </telerik:ChartSeriesItem>
                            <telerik:ChartSeriesItem YValue="50" Name="Item 5">
                            </telerik:ChartSeriesItem>
                        </Items>
                    </telerik:ChartSeries>
                </Series>
            </telerik:RadChart>
       
        </div>
        </form>
    </body>
    </html>

  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 27 Dec 2007 Link to this post

    Hi Jesper Broe Rasmussen,

    Your suggestion makes sense and we will definitely consider it. Your telerik points have been updated.

    Sincerely yours,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top