Author |
Topic  |
|
HorseloverFat
6 Posts |
Posted - 13 Dec 2004 : 10:09:43
|
Hi,
I've implemented zooming and the zoom stack but when i pop items of the stack to return to the previous zoom level i seem to be losing formatting information. For example, the DateCrossoverMode and the AxisLabelsFormat for the TimeAxisLabels reverts to (presumably) default settings. Is there no way of retaining this information automatically? Whats the best way to resolve this issue?
Thanks. |
|
quinncurtis
1164 Posts |
Posted - 13 Dec 2004 : 11:49:53
|
Set the TimeAxisLabels.AutoFormatCrossoverLabels property for to false.
xAxisLab1.AutoFormatCrossoverLabels= false;
|
 |
|
HorseloverFat
6 Posts |
Posted - 13 Dec 2004 : 13:18:31
|
The property you mention does not seem to be available in the TimeAxisLabels class. Nor is it mentioned in the Help file. Do I have an older version? How do I check what version I have? If I need a later version how do I upgrade? I have a Developer licence. |
 |
|
quinncurtis
1164 Posts |
Posted - 13 Dec 2004 : 13:40:23
|
The current revision is 1.0.1.1 and can be viewed by looking at the properties of the QCChart2DNet DLL under your projects References. We checked and that the AutoFormatCrossoverLabels property is present in that revision. You can download the current version of the software using the original download links you were sent in an e-mail at the time you placed the order.
|
 |
|
HorseloverFat
6 Posts |
Posted - 14 Dec 2004 : 05:51:10
|
Thanks. I did have an older version. Is it not possible for you to email registered users when a new version is available or at least display the current version number prominently on your web site?
Although your suggestion has resolved the DateCrossoverMode problem I still have an issue with TimeAxisLabels.SetAxisLabelsFormat. When I create the chart I set this to be TIMEDATEFORMAT_MSDDD but zooming alters this format. |
 |
|
quinncurtis
1164 Posts |
Posted - 14 Dec 2004 : 09:57:06
|
When you zoom, and unzoom from the zoom stack, you must rely on the auto-axis formats, plus or minus the cross-over labels. Setting a custom time axis format on the initial graph setup has no effect once you start zoooming. Every new set of zoom limits must be analyzed and new sets of axes and axes labels created using our auto-axis algorithms. This includes unzooming from the zoom stack, which only stores the zoom limits, and not every detail associated with every axis. The only thing that we can think of for you to do is to add a button that will restore the original time axis labels format, once you have returned the zoom stack back to the beginning. |
 |
|
quinncurtis
1164 Posts |
Posted - 14 Dec 2004 : 11:46:45
|
I was able to come up with a workaround, allowing you to change the time axis labels format after a zoom and unzoom operation. It involves interfering with the normal operation of the ChartZoom class. In this case it traps the OnMouseDown and OnMouseUp events. The logic is:
Disable the time axis labels so that they do not draw Call the base class implementation for the zoom operation Re-enable the time axis labels Set a time axis labels format Call the ChartView.UpdateDraw method to force a redraw of the graph.
In this case the the xAxisLab1 object is made static so that it can be accessed inside of the ZoomWithStack class.
static TimeAxisLabels xAxisLab1;
private class ZoomWithStack: ChartZoom { public ZoomWithStack(ChartView component, TimeCoordinates transform, bool brescale): base( component, transform, brescale) { } public override void OnMouseUp (MouseEventArgs mouseevent) { xAxisLab1.ChartObjEnable = ChartObj.OBJECT_ENABLE_NODRAW; base.OnMouseUp(mouseevent); xAxisLab1.ChartObjEnable = ChartObj.OBJECT_ENABLE; xAxisLab1.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_DDD; this.ChartObjComponent.UpdateDraw(); } public override void OnMouseDown (MouseEventArgs mouseevent) { if ((mouseevent.Button & MouseButtons.Right) != 0) { xAxisLab1.ChartObjEnable = ChartObj.OBJECT_ENABLE_NODRAW; this.PopZoomStack(); xAxisLab1.ChartObjEnable = ChartObj.OBJECT_ENABLE; xAxisLab1.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_DDD; this.ChartObjComponent.UpdateDraw(); } else base.OnMouseDown(mouseevent); } }
|
 |
|
|
Topic  |
|