Feature request :-)

9 views
Skip to first unread message

Barry Coleman

unread,
May 7, 2007, 4:21:04 PM5/7/07
to sparklines for java
Would also be good to add data point markers. I like Tufte's use of
the little red dots that correspond to where the datapoints in an
associated table are. I'm using these dots in a current
implementation to show where the datapoints are 12 months ago
(beginning of the graph), 6 months ago, 3 months ago and now.
Immediately to the right of the sparkline is the data in tabular form
(it's a couple of columns over to the right).

B

larry

unread,
May 15, 2007, 10:04:36 PM5/15/07
to sparklines for java
This is a good idea.

I'm not sure how the API would look for this? I snuck a peek at the
php library, and it looks something like:

$sparkline->SetFeaturePoint(x, y, "red", ...)

maybe we could do something like

<spark:line ...>
<feature x="10" y="10" color="red" />
<feature x="27" y="13" color="green" />
</spark:line>

thoughts/comments?

Barry Coleman

unread,
May 17, 2007, 3:56:42 PM5/17/07
to sparklines for java
Something along those lines is what I was thinking. It would be
really nice to have different types of features (circles, squares,
triangles, icons, etc.). For implementation simplicity, and probably
visual simplicity, probably makes sense to start with a circle, but
make sure it can be overridden. Circles is all I've really used so
far in my graphics (hand drawn).

In the PHP library, does the x and y refer to image coordinate space
or data space. In the data space this would mean the feature would be
positioned with the 10th element if x=10 and have a value of 20 if
y=20. If it is image coordinate space then that's nasty. Also by
making it data space oriented you can allow the user to not provide a
y value and have the tag place the feature at the value from the
dataset. This makes my one year example really easy to implement:

<spark:line ...>
<circle-feature x="1" color="red"/>
<square-feature x="183" color="green"/>
<circle-feature x="274" color="red"/>
<triangle-feature x='366" color="green"/>
<icon-feature x="366" y="20" url="../images/green/uparrow.gif"/>
</spark:line>

B

Reply all
Reply to author
Forward
0 new messages