I have a problem with FastColumnRenderableSeries. It automatically sets min range on Y scale as lowest value of data. But I need min range on Y scale to be 0. How can I achive that easily?
Additional question: How may I set max value of Y scale? In case if there are rare occasions of extraordinary huge volume periods, which would make all other volumes look tiny.
- RTrade A asked 10 years ago
- You must login to post comments
Please look at first screenshot. The volume of a bar where crosshair is about 3500 k, but for me it looks like zero, because Autorange starts Y scale from 3500 as minimal value of bars in visual range. I like how Autorange works for max limit, so I don’t want to switch it off completly, I just want minimal value of Y scale to be always 0.
I also tried your example. To make it change anything, I have to make Autorange=”Never”, and here what I gets:
<s:SciChartSurface.YAxis>
<s:NumericAxis VisibleRangeLimit="0, 99999999999"
VisibleRangeLimitMode="MinMax"
DrawMajorGridLines="False"
DrawMinorGridLines="False"
AutoRange="Never" />
</s:SciChartSurface.YAxis>
Please look at screenshot. It always limits max on Y scale as 10.
- RTrade A answered 10 years ago
- last edited 10 years ago
-
Hi RTrade, Ok the best possible way for you to do this is to handle AxisBase.VisibleRangeChanged, and set VisibleRange.Min to 0 whenever the event fires. If you want to do this neatly, you could wrap it up into an attached property.
-
Ok. Worked this way:
private void NumericAxis_VisibleRangeChanged(object sender, Abt.Controls.SciChart.VisibleRangeChangedEventArgs e) { int max = (int)(double)e.NewVisibleRange.Max; e.NewVisibleRange.SetMinMax(0, max); }
Any obvious inefficiency in this code?
- You must login to post comments
Please login first to submit.