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

Multiple Y Axis and Scrollbars/Zooming

3 Answers 90 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ulrich
Top achievements
Rank 1
Ulrich asked on 15 Oct 2010, 12:41 PM
Hello Telerik Team,

I am currently implementing a WPF RadChart and I am very impressed, but I have one slight problem.

I am using multiple Y-Axis, up to five, and I need the zooming an scrolling feature, as I have to visualize long term data.
I am currently facing two problems:

1) Even when completely zoomed out, I have Scrollbars drawn at each axis, minimzing the screen region for the graph.

2) Every Y-Axis draws a scrollbar. As they all are synchronized anyway, I would like to hide the scrollbards of the additional Y Axis, as this also reduces the graph screen region.

Currently, I am loosing a huge amount of screen real estate to the scrollbars. Is there any way to control the visibility of the bars at each axis? I couldn't find something in the documentation about this.

best regards

Ulrik

3 Answers, 1 is accepted

Sort by
0
Evgeni "Zammy" Petrov
Telerik team
answered on 20 Oct 2010, 11:55 AM
Hi Ulrich,

 Thank you for contacting us.
You made a very good point there and we are considering removing the additional scrollbars all together.
Currently though I can offer you a workaround to get around this :

this.LayoutUpdated += new EventHandler(MainPage_LayoutUpdated);

bool
onlyTheFirstTime = false;
void MainPage_LayoutUpdated(object sender, EventArgs e)
{
    if (onlyTheFirstTime)
        return;
 
    onlyTheFirstTime = true;
 
    var axisContainer = this.ChildrenOfType<Telerik.Windows.Controls.Charting.AdditionalAxes2DContainer>()
        .Where(container => container.Name == "PART_AdditionalVerticalAxesPanel")
        .First();
 
    foreach (var item in axisContainer.ChildrenOfType<RadSlider>())
        item.Visibility = System.Windows.Visibility.Collapsed;
}

The snippet walks the visual tree , finds the panel where the addition  vertical axes are and collapses them. There we have a flag to make sure it is not done on each layout.

Let me know how this worked for you.

Regards,
Evgeni "Zammy" Petrov
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
Ulrich Witschaß
Top achievements
Rank 1
answered on 22 Oct 2010, 05:16 PM
Works like a charm, many thanks!

While talking about the Y-Axis, there is one feature request I got from testers:

In Charts with many Y-Axis, it would of great help to link the interaction features of the series with the Y-Axis it is mapped against, basically dimming/hiding the other Y-Axis. It would make it easier for users to find the Axis the series belongs to.

best regards

Ulrik
0
Evgeni "Zammy" Petrov
Telerik team
answered on 27 Oct 2010, 10:13 AM
Hello Ulrich Witschaß,

 Thank you very much for that suggestion! I have logged it into PITS, you can find it here.

All the best,
Evgeni "Zammy" Petrov
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
Asked by
Ulrich
Top achievements
Rank 1
Answers by
Evgeni "Zammy" Petrov
Telerik team
Ulrich Witschaß
Top achievements
Rank 1
Share this question
or