kbdavid15 / traqpaq_usb

Computer application for traq|paq
1 stars 1 forks source link

DataPage graph scrolling issues #6

Closed kbdavid15 closed 11 years ago

kbdavid15 commented 11 years ago

When using the scroll wheel over the graph, the following exception is thrown:

An unhandled exception of type 'System.ArgumentException' occurred in WindowsBase.dll Additional information: '-332.85,-Infinity,7322.7,Infinity' is not a valid value for property 'Visible'.

kbdavid15 commented 11 years ago

The error is related to the fact that the left side of the plotter still has a MainVerticalAxis. When I switched the location of the Altitude and Speed injected plotters, the error was still thrown on the left side of the chart, even though the Speed plot was now there.

kbdavid15 commented 11 years ago

Also, removing the MainVerticalAxis with plotter.MainVerticalAxis.RemoveFromPlotter(); in the constructor for DataPage did not throw an error but the chart with the vertical axis on the left side was not shown on the plotter

kbdavid15 commented 11 years ago

List of things that didn't work:

  1. Adding ScrollViewer.CanContentScroll="False" to ChartPlotter
  2. Adding SelectiveScrollingGrid.SelectiveScrollingOrientation="None" to ChartPlotter
  3. Adding plotter.MainVerticalAxis.Placement = AxisPlacement.Right; to the DataPage constructor
  4. plotter.MainVerticalAxis.IsEnabled = false;
<d3:VerticalAxis Placement="Left" ScrollViewer.PanningMode="None" SelectiveScrollingGrid.SelectiveScrollingOrientation="None" />

6.

The following works for the right side of the plotter, but not the left:

<d3:InjectedPlotter Name="innerAltitudePlotter" LegendVisibility="Hidden" ConjunctionMode="X" ScrollViewer.VerticalScrollBarVisibility="Disabled">
    <d3:VerticalAxis Placement="Right"/>
    <d3:VerticalAxisTitle Content="Meters" Placement="Right"/>
</d3:InjectedPlotter>

Moving both of the vertical axes for the injected plotters to the right side works, but does not look good: image