Hey Charles and all,

2009/10/15 Hubbard, Charles W <[email protected]>:
> Hi Richard,
>
> I set up a WStandardItemModel model and populated it like shown in your
> proposed work-around, but the data doesn't plot correctly.  Apparently
> WCartesianChart doesn't like the uninitialized cells spread throughout
> the model after all.
>
> But here's something interesting.  I rearranged the ordering in the
> model like so...
>
> xaxis  y1       y2
> 0       10
> 10      20
> 20      30
> 30      40
> 40      50
>
> 3               11
> 7               12
> 17              14
> 25              90
> 33              77
> 38              21
> 39              20
>
> And that seemed to work just fine!  I'm hoping to try this out on my
> real data sets in the next day or two.  My only concern now is, I think
> that it's just lucky that this technique works with the current
> WChart2DRenderer class, and, because it's undocumented (I guess), it may
> quit working with some future version of Wt.

If it is undocumented, it is an omission. It is really supposed to
work. A scatter plot can be used to make plots of random x/y pairs,
and the x values do not need to be ordered (i.e. you can draw a circle
if you want to).

The other solution does not render in the way you intended merely
because of a rendering choice (unless there is a bug): any missing Y
value 'disconnects' the graph. If you are rendering using lines or
curves, the gap is not crossed. Which will make the graph look very
odd if this is not what you intended, but works out very well in other
situations.

> Anyway, thanks for the tip.  Looks like I might have a pure Wt solution
> now that will get me what I need.

Great to hear !

I am not sure now whether I consider this a workaround for
functionality missing: namely a graph where very Y series can have its
own X series..., since in fact I would not have come up with this
solution myself although I implemented the whole thing :-)

Regards,
koen

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