Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3590
NumericYAxis auto range strange behavior
posted

I have a control that contains 4 datacharts all visibility collapsed. Each time a user selects a waveform to plot a series, x, and y axis (no min or max set) are dynamically created and added to the first collapsed datachart and visibility is set to visible and the row definition height that the chart is sitting in is switched to 1,*. When the user deselects a waveform I set that chart's grid row definition height to 0, series and axes are removed and chart visibility is collapsed. What I am seeing is that the user adds 1 or more waveforms and data starts coming in but nothing is plotted. However, once any waveform is removed then the y axis has values and the graph appears. I found that all I needed to call was setting the removed chart's grid row definition height to 0 for the graph to show the plot. The other piece of information I have is that if the y axis min/max are set to values then everything works as expected.

Question is, why does the y axis range only get calculated (or displayed) only after I remove something. Is there a step I am missing? Is there a way to force the chart to redraw and force the y axis to properly set the auto range?

Parents
No Data
Reply
  • 30692
    Suggested Answer
    Offline posted

    There are only certain actions that cause the chart to reevaluate the auto calculated axis ranges. One of these is if the size available to the chart changes. Data changes, if they affect the property bound to the y axis, should also cause the y range to be reevaluated. If the chart things that the y range is empty, it will obviously not try to render the series. You may have created a situation where the chart series size is collapsed during all the events that would normally cause it to refresh the auto range of the axis.

    If you can provide a sample that replicates the issue it should help us track down where there may need to be an additional range recalculation. I suspect that your issue may already be resolved in version 11.1 as we have altered the timing of the range calculation to improve performance.

    To work around the issue, you could perform actions that would cause the auto range to refresh when the chart becomes visible, or use a fixed range for the axis, etc.

    -Graham

Children
No Data