TColorBandTool set min pixels
Posted: Mon Oct 29, 2007 1:23 am
Is it possible to force the TColorBandTool to draw the band N pixels wide but centered on a particular axis value?
Background
---------------
Im using the TColorBandTool to display a shaded region on a chart (with a TLineSeries) where the values for that series are either NaNs or INFs. i.e the series may have valid numbers followed by one or more NaNs and then more valid numbers. Where NaNs exist in the series, i use the AddNullXY method to insert a break in the series and then shade this area using the TColorBandTool.
Setting the StartValue and EndValue properties of the TColorBandTool works fine if you have a large enough visible area (depending on the scaling/zoom of the chart, number of points in the series vs number of NaNs). But if i have a large series of say 10,000 points with only one NaN value and the whole series range is visible, the NaN region is too small to be usefully visible to the user. It's important that any NaN regions are immediately obvious to the user when they view the chart.
I would like to set the TColorBandTool to draw N pixels wide but centered on a particular axis value. It would also be useful to have a TColorBandTool determine which mode is appropriate depending on the chart scaling. i.e IF the StartValue EndValue display area (in pixels) is smaller than the N pixels wide, THEN display the N pixels wide ELSE display the StartValue EndValue region.
Background
---------------
Im using the TColorBandTool to display a shaded region on a chart (with a TLineSeries) where the values for that series are either NaNs or INFs. i.e the series may have valid numbers followed by one or more NaNs and then more valid numbers. Where NaNs exist in the series, i use the AddNullXY method to insert a break in the series and then shade this area using the TColorBandTool.
Setting the StartValue and EndValue properties of the TColorBandTool works fine if you have a large enough visible area (depending on the scaling/zoom of the chart, number of points in the series vs number of NaNs). But if i have a large series of say 10,000 points with only one NaN value and the whole series range is visible, the NaN region is too small to be usefully visible to the user. It's important that any NaN regions are immediately obvious to the user when they view the chart.
I would like to set the TColorBandTool to draw N pixels wide but centered on a particular axis value. It would also be useful to have a TColorBandTool determine which mode is appropriate depending on the chart scaling. i.e IF the StartValue EndValue display area (in pixels) is smaller than the N pixels wide, THEN display the N pixels wide ELSE display the StartValue EndValue region.