Welcome to the Xceed Community | Help
Community Search  
More Search Options

Problem manual scaling graph

Sort Posts: Previous Next
  •  06-05-2009, 6:34 AM Post no. 21410

    Problem manual scaling graph

    Given a chart with those settings

      m_Chart.Axis(StandardAxis.PrimaryY).NumericScale.AutoMax = false;
      m_Chart.Axis(StandardAxis.PrimaryY).NumericScale.AutoMin = false;

     

    For example. if the values along PrimaryY are between 0 and 500 and I set

    m_Chart.Axis(StandardAxis.PrimaryY).NumericScale.Min = 100
    m_Chart.Axis(StandardAxis.PrimaryY).NumericScale.Max = 200:

    It happens the graph goes outside the border of the chart.

    If I choose the same range (Y between 100 and 200) with the zoom function then the graph is inside the border of the chart.

     

    Is there a way to manual scale Min e Max of PrimaryY and at the same time not to see the graph outside of the chart border? Something
    like an automatic zooming

     

    Thanks

  •  06-25-2009, 6:09 AM Post no. 22002 in reply to 21410

    Re: Problem manual scaling graph

    Any answer?
  •  06-25-2009, 4:53 PM Post no. 22056 in reply to 21410

    Re: Problem manual scaling graph

    Hi,

    could  

    m_Chart.MarginMode = MarginMode.Fit

    or

    m_Chart.MarginMode = MarginMode.Stretch;

    be what you're looking for?

    You should probably have a closer look at the Xceed.Chart.Samples.Explorer, in particular the Fit Margin Mode and the Stretch Margin Mode examples.


    Ghislain
    Technical Support and software developer
    Xceed Software Inc.
    Knowledge Base : http://xceed.com/kb/
    Update Center : http://xceed.com/updates/
    Documentation Center : http://xceed.com/doc/
    For everything else, there is Google
  •  07-03-2009, 5:16 AM Post no. 22242 in reply to 22056

    Re: Problem manual scaling graph

    Unfortunately the MarginMode is not what I am looking for.

    If I set the minimum and maximal value of Y (es 100 - 200) manually, it happens the values between 100 and 200 are visualized into the m_chart area.

    By contrast, the Y values < 100 or > 200 (if present) are visualized outside the m_chart and inside the m_chartControl.

    This is optically not very nice.

    So the main problem is: values < 100 and > 200 are still visible

     


  •  07-24-2009, 3:41 PM Post no. 22887 in reply to 21410

    Re: Problem manual scaling graph

    Hi again,

    I am still not sure of what you want to do exactly.  You said that you would like to be able to select a the minimal and maximal values to be visualized.  You would like all other values to be invisible?  And you would like to have an "auto-zoom" feature to fill the display area?  This means that, with the zoom, the 100-200 preset could change radically.  Suppose that are your data are actually between 155 and 159 and you are using you "auto-zoom", this would mean the Y axis would get auto-corrected to display Y:150-160 ?

    You must also consider that if the 155 (from the scenario above) is the first value in the series, and 158 is the last one, and every other values is out of your (Y:100-200) selected range, the data points would almost appear as a DBNull.Value even if these are not (they could anything below 100). 

    Could it make sense to copy all the values between 100 and 200 to a temporary DataSeries and to display these?  (I'm only suggesting since I don't know what your data is about.)

    It would require a complex algorithm to obtain a "optimized viewport" from the data and a min-max scale, in my opinion, for the reasons mentioned above. 


    Ghislain
    Technical Support and software developer
    Xceed Software Inc.
    Knowledge Base : http://xceed.com/kb/
    Update Center : http://xceed.com/updates/
    Documentation Center : http://xceed.com/doc/
    For everything else, there is Google
  •  09-11-2009, 2:54 AM Post no. 23890 in reply to 22887

    Re: Problem manual scaling graph

    Yes, if I set manually the Y-range, I would like all the values outside that range to be invisible.

    Unfortunately for my case I cannot copy all the values within the range inside a temporary dataseries.

     What works great is if I select the Y-range with the mouse making a zoom.

     

    Is there a way to perform a zooming only using code? I mean without using the mouse.

     

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.