Histogram - a few questions
Histogram - a few questions
Hi,
I like to use a histogram chart, but I got 2 problems:
- the chart exists of continous data input, but how can I update the histogram??? There is no edit methode....
- is it possible to set 2 markers in the x-axis? And change them later?
Any ideas and workarounds are welcome....
Thanks a lot!
Markus
I like to use a histogram chart, but I got 2 problems:
- the chart exists of continous data input, but how can I update the histogram??? There is no edit methode....
- is it possible to set 2 markers in the x-axis? And change them later?
Any ideas and workarounds are welcome....
Thanks a lot!
Markus
Re: Histogram - a few questions
Hi!
Please do the following:
1) read How to ask a question
2) search this forum and find the answers to your questions there
- martin
Please do the following:
1) read How to ask a question
2) search this forum and find the answers to your questions there
- martin
Re: Histogram - a few questions
Thanks a lot!!! Thats exactly what I´m looking for 
1.) The topic (I guess this is what you mean?) points to histograms and this subject isnt very wide...
2.) I have stilled searched the forum and google, but mayby you could be so kind to post a link
But ok,....
In the meantime I tried a lot with the histogramdatasets "HistogramDataset" and "SimpleHistogramDataset". The first one does exactly the things I need (HistogramType.RELATIVE_FREQUENZY ) but doesnt support any data adding methods! The second one is fine for updating the chart with data, BUT the graph only displays the number of data belongs to each bin (setAdjustForBinSize(false) ), or a value that I dont understand setAdjustForBinSize(true)!

1.) The topic (I guess this is what you mean?) points to histograms and this subject isnt very wide...
2.) I have stilled searched the forum and google, but mayby you could be so kind to post a link

But ok,....
In the meantime I tried a lot with the histogramdatasets "HistogramDataset" and "SimpleHistogramDataset". The first one does exactly the things I need (HistogramType.RELATIVE_FREQUENZY ) but doesnt support any data adding methods! The second one is fine for updating the chart with data, BUT the graph only displays the number of data belongs to each bin (setAdjustForBinSize(false) ), or a value that I dont understand setAdjustForBinSize(true)!
Re: Histogram - a few questions
No need to be sarcastic. I just pointed you to some rules that should be respected on this forum!Traxer wrote:Thanks a lot!!! Thats exactly what I´m looking for
The subject wasn't perfect but that's not what I referred to. As both, markers and updating datasets has been asked and answered before on this forum, I wanted you to search the forum before posting!1.) The topic (I guess this is what you mean?) points to histograms and this subject isnt very wide...
Maybe you should have searched a bit harder...2.) I have stilled searched the forum and google, but mayby you could be so kind to post a link![]()
Regarding dataset updates I found this in about 20 seconds. It's not specific for HistrogramDataset but it basically works the same for all kind of dataset.
Regarding markers: finding the answer to modifying markers took me about one minute.
Adding more than one marker is possible. Trying this out would probably be faster than asking and waiting for an answer.
- martin
Re: Histogram - a few questions
Great Link....Regarding dataset updates I found this in about 20 seconds. It's not specific for HistrogramDataset but it basically works the same for all kind of dataset.

But the HistogramDataset has no method for adding data continuosly. I can only put an array into the dataset and thats it. So I think, I have to rebuild the whole dataset for any new data I will receive. The link shows no soltions anyway! But maybe you can give me a hint, how to remove and replace series in the dataset...
Re: Histogram - a few questions
What about calling the addSeries() Method again with new/updated values?But the HistogramDataset has no method for adding data continuosly. I can only put an array into the dataset and thats it.
That should update your chart.
- martin
Re: Histogram - a few questions
If I use the addSeries() Method again, then I will add a series. But the existing series will be still in the histogram. Even if I cant remove any series my only Idea is to drop the whole histogram and build a new one... You see, I isnt a simple as it seemsmatinh wrote:What about calling the addSeries() Method again with new/updated values?But the HistogramDataset has no method for adding data continuosly. I can only put an array into the dataset and thats it.
That should update your chart.
- martin
Re: Histogram - a few questions
HistgramDataset seems to be a bit odd here compared to most other datasets.
You could try extending it and add a removeSeries(int series) or updateSeries(int series, [other args]) method.
Or you could just implement your own XYIntervalDataset which suits your needs. This shouldn't be too hard.
- martin
You could try extending it and add a removeSeries(int series) or updateSeries(int series, [other args]) method.
Or you could just implement your own XYIntervalDataset which suits your needs. This shouldn't be too hard.
- martin
Re: Histogram - a few questions
matinh wrote: This shouldn't be too hard.

Therefore I´m looking for some code examples or existing workarounds.