c# - How to do aligned scrolling through two chart areas without using AlignToChartArea? -
i have 2 chartarea
objects in chart
(system.windows.forms.datavisualization.charting
i'm using).
one point graph, , other rangebar graph. horizontal axis on rangebar graph y axis, cannot use this:
chart1.chartareas["chart area 2"].alignwithchartarea = "default";
i've figured out how zoom both charts , keep them aligned, when try scroll both charts clicking on scrollbar on 1 of horizontal axes, can't quite line up. almost line up, they're off maybe second or (the horizontal axis in both graphs time).
here's have:
private void thechart_axisviewchanged(object sender, vieweventargs e) { if (e.chartarea == thechart.chartareas["mypointchartarea"]) { thechart.chartareas["myrangebarchartarea"].axisy.scaleview.position = e.newposition; thechart.chartareas["myrangebarchartarea"].axisy.scaleview.size = e.newsize; thechart.chartareas["myrangebarchartarea"].axisy.scaleview.sizetype = e.newsizetype; } if (e.chartarea == thechart.chartareas["myrangebarchartarea"]) { thechart.chartareas["mypointchartarea"].axisx.scaleview.position = e.newposition; thechart.chartareas["mypointchartarea"].axisx.scaleview.size = e.newsize; thechart.chartareas["mypointchartarea"].axisx.scaleview.sizetype = e.newsizetype; } }
what else need charts line up? physical extent of charts same. it's data misaligned.
thanks help.
Comments
Post a Comment