Ask a questionAsk a question
 

QuestionZoom bug

All Replies

  • Thursday, June 25, 2009 5:22 PMScottyDoesKnow Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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.

  • Thursday, June 25, 2009 5:27 PMScottyDoesKnow Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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
                });

  • Monday, June 29, 2009 5:51 PMDelianTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Looks like known issue. Please use Chart.AxisViewChanged event to refresh the chart.


     private void chart1_AxisViewChanged(object sender, ViewEventArgs e)
    {
                chart1.Refresh();
    }
    Delian
  • Monday, June 29, 2009 6:27 PMScottyDoesKnow Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Tuesday, June 30, 2009 7:33 PMScottyDoesKnow Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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?
  • Wednesday, July 01, 2009 8:09 PMScottyDoesKnow Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Anybody got a fix for this?
  • Friday, July 03, 2009 11:52 AMSimón P. Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.