MS Chart zooming with multiple chart areas - c#

I am having an issue when trying to set up zooming into a chart area. I have made multiple charts before where the user selects an area and it zooms in normally, but in this particular application I have 3 chart areas in one chart control and when I make a selection in one chart area, all of the other chart areas zoom to that area as well.
You can see that all three chart areas are selected when I am only selecting the first one.
The only code I have for each one of these chart areas is
Chart1.ChartAreas[i].CursorX.IsUserSelectionEnabled = True;
Chart1.ChartAreas[i].CursorY.IsUSerSelectionEnabled = True;
Chart1.ChartAreas[i].AxisX.Zoomable = True;
Chart1.ChartAreas[i].AxisY.Zoomable = True;
NOTE: I have this set for each individual chart area, I just didn't want to write too much.
So I was wondering if anybody knows of any possible way to make each individual chart area zoomable with a selection of the mouse and not zoom the other 2 chart areas when I make a selection in one?
Thank you so much for your time and consideration

I found out what the issue was and why all the chart areas were zooming at the same time --
I had Chart.ChartArea[i].AlignWithChartArea set to other charts to make the visuals a bit better. Apparently that binds the zooming as well for some reason.

Related

C# Showing which series a data point is from when clicking on it in Plot model (Winforms)

I am working on a GUI which is filled with different plot models, so space is limited. In the example image there are four different series and i have clicked on one point (where the arrow is pointing). This makes a box show up with X and Y info, I was wondering if it was possible to show which series the datapoint is from in the box as well. I have attempted to use Tooltips but I have not been able to understand how they work. If anyone could offer a hand that would be great.
Cheers
I found the solution. You can add a title to the series by just doing plot.series.Title = "etc". This will add a title to the X,Y box

Resize chart areas to fit to chart

I have a chart with multiple chart areas. There is also a button that when pressed deletes ( chart1.ChartAreas.Remove(chart1.ChartAreas[select]);) a selected chart area, as you can see below :
How can I resize the other chart Areas in order to take over the free area when one chart area is deleted?

How to keep custom shapes on slide independent of the aspect ratio in PowerPoint C# VSTO?

I have some custom text-boxes and an image on PowerPoint slide created programmatically in C# VSTO. While everything looks nice in 4:3 aspect ratio, the text-boxes stick together (in other words, the distance between them gets diminished) as soon as I change the aspect ratio to 16:9. I want to keep the separation between the text-boxes same irrespective of the aspect ratio selected for the slide.
I tried with the LockAspectRatio property of the shapes, but I guess I am missing something.
Edit:-> Also, with 16:9 aspect ratio selected, when I add another custom slide(on click of a custom button) the textboxes and other shapes move out of the slide. Which should not happen and the shapes should readjust themselves to fit inside the selected size.
Can anyone help me we this.
Any help is appreciated. Thanks.

ASP.NET (C#) Column Chart on top of Column Chart

I am drawing 2 RangeColumn Graphs, problem is they appear next to each other. I am wondering if there is a setting that will allow me to draw the graphs on top of each other. So graph 2 will be visible over graph 1. Both graphs have different widths so I should still be able to see graph 1 in the back.
Here is a google image I found that describes what I want
http://msdn.microsoft.com/en-us/library/dd456710.aspx
You need to set the DrawSideBySide property to false. You can then play with the widths to get your desired effect.

c# chart control, vertical scrolling problems with zoom ["Stuck Scroll bar"]

I have a program with a large c# chart control. I am allowing zooming by allowing the user to select any area and it will zoom in. This all works fine. When I go to scroll horizontally this also works fine and very smooth. However when I try to scroll vertically the scroll bar wont move, the only thing I can do is use the up and down arrow keys on the scroll bar and that only gives either the very top of the graph or the very bottom of the graph I can't scroll to anything in between. Any ideas on what could be happening? Please let me know what additional information I can provide.
thanks!
Some of my properties:
ChartArea
CursorX & CursorY
AutoScroll = True
AxisType = Primary
IsUserEnabled = True
IsUserSelection = True
I have found the solution to my problem.
I needed to lower the value under
chartAreas.AxisY.ScaleView.SmallScrollMinSize
the values on my Y axis where much smaller then the ones on my X axis thus I had to have a smaller "SmallScrollMinSize" in order for scrolling to work appropriately.
I figured this out from this article
http://www.codeease.com/scrolling-stuck-in-microsoft-chart-control-2.html

Categories

Resources