Hello!
We recently implemented an function to show/hide certain series in a chart. Now we would like for the chart to recalculate the axis, because you can get significant whitespace if an exceptionally long/heigh chart is hidden.
For an example, in the following stackblitz, if you hide the column "1 Werkbegroting", I would like to rerender the chart with a max x of 200.000, instead of the 400.000 it keeps showing
stackblitz.com/.../github-8zw4gw-lgrhoj
Hello Jonas,
With the current implementation of the IgxDataChart, the auto calculated minimum and maximum values of the axes will be reflected regardless of the visibility of the series as the series is still “plotted” in the chart and has a corresponding axis.
Something you can do in this case to prevent this is to mark the “value axis” as null. In the case of the StackBlitz you provided, this would be the X-Axis as you are using an IgxBarSeries. You could mark the xAxis as null in the render function that changes the series visibility, but keep in mind that you will need to set it back when you make the series visible again or the series will not be rendered.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
There is so much to discover and appreciate on your blog! It enhances my experience and gives me a lot of joy. I appreciate you giving this insightful information. do my assignment UK