Formular una preguntaFormular una pregunta
 

PreguntaZoom bug

Todas las respuestas

  • jueves, 25 de junio de 2009 17:22ScottyDoesKnow Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    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.

  • jueves, 25 de junio de 2009 17:27ScottyDoesKnow Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

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

  • lunes, 29 de junio de 2009 17:51DelianTMSFT, ModeradorMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Looks like known issue. Please use Chart.AxisViewChanged event to refresh the chart.


     private void chart1_AxisViewChanged(object sender, ViewEventArgs e)
    {
                chart1.Refresh();
    }
    Delian
  • lunes, 29 de junio de 2009 18:27ScottyDoesKnow Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    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.
  • martes, 30 de junio de 2009 19:33ScottyDoesKnow Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    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?
  • miércoles, 01 de julio de 2009 20:09ScottyDoesKnow Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Anybody got a fix for this?
  • viernes, 03 de julio de 2009 11:52Simón P. Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    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.