User (Legacy) Posted August 26, 2004 Report Share Posted August 26, 2004 I have to Zoom a chart horizontaly, by pressing a button but this code works only 1st time... private double mViewMin=0; private double mViewMax=0; private void ZoomX() { double ViewMin,ViewMax; chart.AxisX.GetScrollView(out ViewMin,out ViewMax); if (mViewMin==0) mViewMin=ViewMin; if (mViewMax==0) mViewMax=ViewMax; mViewMin-=0.005; mViewMax+=0.005; chart.AxisX.Zoom(mViewMin,mViewMax); } As you can see i cache ViewMin and ViewMax, value changes but Graph doesn't. How can i zoom my charts?, tried adding RecalcScale but nothing changes... Thanks -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://www.ugidotnet.org/710.blog Link to comment Share on other sites More sharing options...
Software FX Posted August 26, 2004 Report Share Posted August 26, 2004 The problrm with this code is that you are zooming out, not in. You can not zoom out in a chart that is not zoomed. Maybe what you want to do is this: double ViewMin,ViewMax; chart1.AxisX.GetScrollView(out ViewMin,out ViewMax); if (mViewMin==0) mViewMin=ViewMin; if (mViewMax==0) mViewMax=ViewMax; mViewMin+=0.005; mViewMax-=0.005; chart1.AxisX.Zoom(mViewMin,mViewMax); If not, can please explain what you are trying to do. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 26, 2004 Author Report Share Posted August 26, 2004 After your hint i finally got it working, just a note: when zooming and scolling i see sometimes X labels disappearing (nothing appear on X Axe), just scroll a little and labels reappers, is this a bug or is there any 'detail' to set for this behaviour? Thank you -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://www.ugidotnet.org/710.blog Link to comment Share on other sites More sharing options...
Software FX Posted August 26, 2004 Report Share Posted August 26, 2004 I would need more information, I can see cases where you zoom into an area in which there are no labels, that by itself can be normal. Do you have an specific case ? -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 26, 2004 Author Report Share Posted August 26, 2004 > Do you have an specific case ? What do you exactly mean? do you need a screenshot or more details? -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://www.ugidotnet.org/710.blog Link to comment Share on other sites More sharing options...
Software FX Posted August 26, 2004 Report Share Posted August 26, 2004 A screenshot won't do because not seeing labels I won't be able to tell whether this is wrong or not. What I need is a repro case, a little bit of code that reproduces the problem starting with a default chart or a chart file (exported using the Export method) along with code or instructions to reproduce this case. The code that you sent before will produce a chart with no labels when the range being displayed is too small. Too small means that with the number of decimals used, or the Step being set, the range is empty. For example if you have a step 0f 0.5 and want to display from 0.1 to 0.2 you will get no labels. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 27, 2004 Author Report Share Posted August 27, 2004 Thanks I'll do a test and I'll let you know. I'm figuring some "minor" troubles (refresh,resizing...) but I'd like to finish my code before involving you on this details. I'll keep you informed... Corrado -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://www.ugidotnet.org/710.blog Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.