Odeslat dotazOdeslat dotaz
 

DotazZoom bug

Všechny reakce

  • 25. června 2009 17:22ScottyDoesKnow Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     

    Alright so I don't know if that bug is in the chart because it's not happening now. It was happening just as I serialized the chart though, I checked. That one seems to have dissappeared and another one appeared though. In the serialized chart the X values are in seconds. I have a drop down which changes to milliseconds/microseconds/etc... When you do this it clears the series like so:

    SeriesChartType oldChartType = chartBottom.Series[SERIES_VS].ChartType;

                chartBottom.Series[SERIES_VS].Dispose();
                chartBottom.Series[SERIES_VS] = new Series(SERIES_VS)
                {
                    Color = Color.Black,
                    ChartType = oldChartType,
                    ChartArea = chartAreaBottom.Name
                };

    Then it refills the series with new points, calls RecalculateAxesScale() and resets the zoom. Now if you click on the graph (without zooming, just a click) the image you see switches to the previous graph. If the previous graph was zoomed in it will even show that, but when you zoom it acts on the regular graph. Hopefully you've seen this before because it will be harder to get you a project that it was just to serialize the chart.

  • 25. června 2009 17:27ScottyDoesKnow Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     

    Oh and it won't happen unless you click the graph once before changing the scale also, and I walked through the click event and it doesn't change the graph at all. Also changed the series clearing to this with no change in results:

    Series oldSeries = chartBottom.Series[SERIES_VS];
                SeriesChartType oldChartType = oldSeries.ChartType;

                chartBottom.Series.Remove(oldSeries);
                oldSeries.Dispose();

                chartBottom.Series.Add(new Series(SERIES_VS)
                {
                    Color = Color.Black,
                    ChartType = oldChartType,
                    ChartArea = chartAreaBottom.Name
                });

  • 29. června 2009 17:51DelianTMSFT, ModerátorUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Looks like known issue. Please use Chart.AxisViewChanged event to refresh the chart.


     private void chart1_AxisViewChanged(object sender, ViewEventArgs e)
    {
                chart1.Refresh();
    }
    Delian
  • 29. června 2009 18:27ScottyDoesKnow Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    That kind of works, though I had to put it on MouseDown since that's when it happens. I tried putting it in axisviewchanged but then the selection wouldnt go away when it zoomed and it was flashing around worse than before. There's still a problem though because when it does work it flashes to the old graph and then back to the right one.
  • 30. června 2009 19:33ScottyDoesKnow Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Also, is there a known bug report somewhere? Something I could show to a client in case they think the problem is in my code?
  • 1. července 2009 20:09ScottyDoesKnow Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Anybody got a fix for this?
  • 3. července 2009 11:52Simón P. Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Also, is there a known bug report somewhere? Something I could show to a client in case they think the problem is in my code?
    Hi

    I've experienced an odd behaviour which looks like what's happening to you. I reported it here , and I was told it's a bug and will be fixed (hopefully). I hope this helps you. I didn't get a fix or workaround as I've stopped temporary using the charts.