The function in chartfactory to create an OHLC chart wants a timeline. Is there a simple way to create a timeline directly from the defaultOHLCDataset (the OHLCDataItems has the Date values) and all the data is being read using JDBC from a RDBMS.
We had bought the documentation, but it says nothing about this, and I found nothing searching on the relevant function and type names.
I want to display OHLC and volume data for ETFs, and then, ultimately, overlay plots of closing prices for selected stocks in a selected ETF.
Getting the data into JTable controls I have found to be trivially easy, but getting it into a chart is another matter.
Anyway, any suggestions or help would be appreciated.
Ted
Using chartfactory to create OHLCchart
creating ohlc chart with domain crosshair
OK, I solved the problem of creating these charts. Unfortunately, the details of creating a timeline are omitted from the documentation, but I finally found the solution in a static function that creates a segmented timeline that includes only weekdays.
Now I have a different problem. I created two charts, one a time series chart and the other an OHLC chart, using the chartfactory with th expected arguments to the relevant functions. I then obtain the XYPlot object each has and modify the background colour, and even the crosshair colour. On the timeseries shart, the domain rosshair works fine. On the OHLC chart, I do not get any compile time errors and I do not get any runtime exceptions, but the crosshair either isn't created or it is invisible. Why? I did precisely the same thing with the XYPlot from the OHLC chart that I did to the timerseries chart, but it worked on the latter but not the former!
Any help would be appreciated.
Thanks,
Ted
Now I have a different problem. I created two charts, one a time series chart and the other an OHLC chart, using the chartfactory with th expected arguments to the relevant functions. I then obtain the XYPlot object each has and modify the background colour, and even the crosshair colour. On the timeseries shart, the domain rosshair works fine. On the OHLC chart, I do not get any compile time errors and I do not get any runtime exceptions, but the crosshair either isn't created or it is invisible. Why? I did precisely the same thing with the XYPlot from the OHLC chart that I did to the timerseries chart, but it worked on the latter but not the former!
Any help would be appreciated.
Thanks,
Ted