Is there a way to overlay an interval bar chart with a time series using the current 0.9.4 API? I am not sure it's possible because the BasicTimeSeries class only implements one a period and value as a parameter. The closest thing I could find in the demo code is the OverlaidXYPlotDemo. The only problem with that one is it's not an interval bar chart.
I've thought of using the DefaultHighLowDataset but I'm not sure. All that I would need from that class would be the open/close values.
What I want to plot is blood pressures (systolic/diastolic); which is sort of like open/close.
The library is great.
Thanks for any help.
Overlaying IntervalBarChart with TimeSeries
Re: Overlaying IntervalBarChart with TimeSeries
Hi Paul,
I think you can use the IntervalXYDataset interface to represent the structure of your data, the only problem is that there is not a default implementation of the interface yet. The TimeSeriesCollection class does implement it, but only in a restricted way (designed for displaying simple bar charts of time series values).
If you can supply a demo dataset, I can take a look at what is required (my guess is that you are after something like a candlestick chart but without the small lines to the high and low values). Overlaying the line chart is simple once you have a renderer that can draw the interval bar chart.
Regards,
DG
I think you can use the IntervalXYDataset interface to represent the structure of your data, the only problem is that there is not a default implementation of the interface yet. The TimeSeriesCollection class does implement it, but only in a restricted way (designed for displaying simple bar charts of time series values).
If you can supply a demo dataset, I can take a look at what is required (my guess is that you are after something like a candlestick chart but without the small lines to the high and low values). Overlaying the line chart is simple once you have a renderer that can draw the interval bar chart.
Regards,
DG
Re: Overlaying IntervalBarChart with TimeSeries
Hi Dave,
Thanks for taking the time to answer my question. Here are some demo datasets:
Series 1 (Heart Rate)
126, 129, 123, 130, 126, 125, 123, 120, 116, 118
Series 2 (Respiratory Rate)
33, 31, 29, 31, 34, 37, 37, 25, 32, 28
Series 3 (Blood Pressure [systolic/diastolic])
123/89, 135/75, 146/82, 152/93, 148/95, 157/97, 159/96, 151/93, 146/89, 142/88
The above measurements were taken at the following times:
8:00 am, 8:15 am, 8:30 am, 8:45 am, 9:00 am, 9:15 am, 9:30 am, 9:45 am, 10:00 am, 10:15 am
For series 1&2, I would like a line graph for each. For series 3, I would like the point plotted with a veritcal line connecting them.
The graph is for doctors and I think that not only do the points matter but also the difference between them matter for blood pressure.
Given the above data:
At 8:00 am there was a heart rate of 126, a respiratory rate of 33, and a blood pressure of 123/89 (126 should be connected to 89 with a vertical line)
Thanks for taking the time to answer my question. Here are some demo datasets:
Series 1 (Heart Rate)
126, 129, 123, 130, 126, 125, 123, 120, 116, 118
Series 2 (Respiratory Rate)
33, 31, 29, 31, 34, 37, 37, 25, 32, 28
Series 3 (Blood Pressure [systolic/diastolic])
123/89, 135/75, 146/82, 152/93, 148/95, 157/97, 159/96, 151/93, 146/89, 142/88
The above measurements were taken at the following times:
8:00 am, 8:15 am, 8:30 am, 8:45 am, 9:00 am, 9:15 am, 9:30 am, 9:45 am, 10:00 am, 10:15 am
For series 1&2, I would like a line graph for each. For series 3, I would like the point plotted with a veritcal line connecting them.
The graph is for doctors and I think that not only do the points matter but also the difference between them matter for blood pressure.
Given the above data:
At 8:00 am there was a heart rate of 126, a respiratory rate of 33, and a blood pressure of 123/89 (126 should be connected to 89 with a vertical line)
Re: Overlaying IntervalBarChart with TimeSeries
There was a small error with the previous message. Only the blood pressure measurements need to be connected with a vertical line. Another words systolic should be connect to diastolic. Therefore, for the first measurement of blood pressure, 123 should be connected to 89 with a vertical line at 8:00 am.
The last few lines should have read:
Given the above data:
At 8:00 am there was a heart rate of 126, a respiratory rate of 33, and a blood pressure of 123/89 (123 should be connected to 89 with a vertical line)
The last few lines should have read:
Given the above data:
At 8:00 am there was a heart rate of 126, a respiratory rate of 33, and a blood pressure of 123/89 (123 should be connected to 89 with a vertical line)