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

Plotting 2 line graphs in their own scale

3 Answers 79 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
wj
Top achievements
Rank 1
wj asked on 11 Feb 2010, 11:27 PM
Hi,

I am plotting 2 line graphs in the same chart and I want to remove the y-axis and let the 2 graphs have their own scale and not scaled relatively to each other. Put it simply, the graph would plot as if it doesnt know the other graph exists. I would use the labels to show the values instead.
For instance, linegraph 1 which is a sloping straight line with y values from 1 to 10 would be exactly the same as linegraph 2 that has y values from 0 to 100.
 May I know how this can be done?
Thks for any help!

Regards,
Wayne

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 16 Feb 2010, 10:23 AM
Hi,

You can use the Secondary Y axis in RadChart for the second series. At the same time you can hide both YAxis and YAxis2. Here is an example:

<telerik:RadChart ID="RadChart1" runat="server">
    <Series>
        <telerik:ChartSeries Name="Series 1" Type="Line">
            <Items>
                <telerik:ChartSeriesItem Name="Item 1" YValue="0">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 2" YValue="1">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 3" YValue="2">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 4" YValue="3">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 5" YValue="4">
                </telerik:ChartSeriesItem>
            </Items>
        </telerik:ChartSeries>
        <telerik:ChartSeries Name="Series 2" Type="Line" YAxisType="Secondary">
            <Appearance>
                <LabelAppearance Visible="False">
                </LabelAppearance>
            </Appearance>
            <Items>
                <telerik:ChartSeriesItem Name="Item 1" YValue="0">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 2" YValue="10">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 3" YValue="20">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 4" YValue="30">
                </telerik:ChartSeriesItem>
                <telerik:ChartSeriesItem Name="Item 5" YValue="40">
                </telerik:ChartSeriesItem>
            </Items>
        </telerik:ChartSeries>
    </Series>
    <PlotArea>
        <YAxis Visible="False">
        </YAxis>
        <YAxis2 Visible="False">
        </YAxis2>
    </PlotArea>
</telerik:RadChart>


Best regards,
Ves
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
wj
Top achievements
Rank 1
answered on 26 Feb 2010, 07:11 PM
Hi,

Thanks for your reply. The solution can only work for up to 2 line graphs. However, I have about 5 line graphs that I wish to plot.
Is there anyway to do that? Thanks!

Regards,
wj
0
Ves
Telerik team
answered on 03 Mar 2010, 07:49 AM
Hi wj,

I am afraid RadChart for ASP.NET AJAX supports only two Y axes. You can take a look at RadChart for Silverlight - it does support multiple Y axes, you can find an example here.

Greetings,
Ves
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.
Tags
Chart (Obsolete)
Asked by
wj
Top achievements
Rank 1
Answers by
Ves
Telerik team
wj
Top achievements
Rank 1
Share this question
or