views:

121

answers:

1

I have some data of balances ($), dates, and memos. I want to plot this as a line graph. I was happily plotting away with http://www.maani.us/xml_charts/ until I realized that my x-axis was off: there aren't balances for every day, and sometimes there are multiple balances on a single day. How can I compensate for this (space out the dates appropriately)?. I tried using unix_timestamps for the dates so that it could have a numeric value, but this only works for scatter plots (and it sucks at that). The memos I want to appear as tooltips.

Are there any other libraries/APIs that can handle this? Will Fusion Charts do it? Basically I need a chart API that can handle numeric values for both the X and Y axis, but allows me to rename the X axis so it doesn't actually appear as numbers, and supports tooltips (ie is flash based).

+2  A: 

Mark,

In FusionCharts scatter chart, we've numeric x and y axis. The good part is that the scatter chart can be made to behave like a line chart. You can connect the points of the scatter chart using a line by setting: <dataset drawLine='1' ....>

So to show dates on the x-axis, do the following:

  1. Set the value of the least date in your dataset as 0
  2. For every other date, calculate the dateDiff(leastDate, days) and set that as the x-axis value.

Hope that helps...

Sanket Nadhani
Haha...did you come here just to keep your customers happy? Kudos to you! I'll try this out later. Thanks :D
Mark
I used xAxisMinValue and MaxValue instead, with <category label>s to display the dates. I think your answer is a little incomplete, but it got me set on the right track, so I'll give you the check.
Mark