Hi list,

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.

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
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?


With regards,


Charlie Hubbard

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to