Hey Charles,

2009/11/3 Hubbard, Charles W <[email protected]>:
> Recently I've been working with the WCartesianChart widget to graph data
> sets (as some of you may recall from my recent earlier posts).  As
> things stand now, I've got a WCartesianChart solution that is working
> well.  I would like the ability to zoom in on a portion of the plot
> data, and, for that, I am having some difficulty.
>
> I debated whether or not I should post this as two separate posts, but
> finally decided to do it all in one, because my two issues are related.
> First, I'll tell you what I'd like to do and then what I'm currently
> trying to do, but seem to have some buggy behavior.
>
> 1) To zoom in on a section of the chart data, what I'd really like to be
> able to do is drag a bounding box around the area of interest with the
> mouse and then have the chart widget automatically replot with the axes
> adjusted to just display the data that fell within the region of the
> bounding box.  Naturally, there would also need to be some way to undo
> the "zoom" and get back to the original plot limits.  I have no idea how
> to do this.  I don't even know if it is possible.  It's not supported by
> the current WCartesianChart widget.  If it is possible and doesn't
> involve an enormous amount of overhead, I wonder if the developers would
> consider implementing such a feature in some future version of the
> library.

This would be not too hard, and indeed quite useful. However, I
believe it would immediately prompt for a next feature: to be able to
navigate also by dragging the charting area (correct me if I'm
wrong?). That feature is a lot harder if you want to be clever enough
to only render the part of the chart that is visible (or nearby).

Ideally, I would therefore implement these changes together. But, see
also your new post...

> 2) Okay, so much for the feature request.  Here's what I am actually
> doing now.  For my current application, It's acceptable to leave the

I guess this has been refined already a bit since, as explained in
your newer post ?

> Y-axis scaled the way it is and only zoom in on a portion of the X-axis.
> As a test, I set up two WLineEdit widgets into which I can manually
> enter the minimum and maximum X-axis values I'd like to see plotted, and
> then I call the X-axis (WAxis) setRange() method to limit the range of
> the X-axis data to those values.  That *almost* works fine, but I am
> seeing some odd behavior that might be a bug.  In my full dataset, I
> have maybe 10 series to plot, and I can select which ones to plot and
> which ones not to plot using WCheckBox widgets.  If I select three
> series (for example), then the first two plot perfectly, with the left
> and right edges of the series data being properly clipped at the X-axis
> boundaries previously set with setRange().  However, the third series
> doesn't get clipped at the axis boundaries.  Instead, it clips further
> to the left and right, at what appears to be the boundary of the entire
> WCartesianChart widget (that is, the series starts on the far left over
> the top of the Y-axis label and ends on the far right over the top of
> the chart legend).  If I then add a 4th series to the mix, the three
> original series now clip perfectly, and only the 4th series clips to the
> edges of the WCartesianChart rather than the edges of the X-axis.  This
> behavior is consistent in that all series selected always clip exactly
> right except for the very last series, which always clips long.  Any
> ideas?

That seems like a real bug indeed. To narrow down whether this a bug
in the charting library, the painter, or a specific rendering backend,
do you have the same behavior using different renderers (for example
using VML on IE and using Canvas/SVG on Firefox ?) ?

Regards,
koen

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to