MPAndroidchart- Candlestick -X-Axis

I noticed that the MPAdroidChart candlestick seemed to render from left to right even if I set the CandleDataSet to be YAxis.AxisDependency.RIGHT. Historical Stock data maintain in csv format downloaded from Yahoo Finance always have the latest updated share price data in the second readline and progressively arranging according to the date historically backward with the most earliest available historical data towards the end of the csv files.

To enable the data to be display from eg year 1993 to year 2015 left to right , I can not set the xindex in the YVals CandleEntry as 0 for year 2015 but instead set the highest index for the most up to date data to enable the display as shown by the picture below . enter image description here

To enable better rendering performance, I choose to limit the display for xrange to be 100 , the final chart however could not display the latest last 100 after chart.setVisibleXRangeMaximum(100) which is shown by the picture below
Limit to x 100

I would appreciate if there is a suggestion on how to render the candlestick chart from right to left by setting the xindex 0 for the latest candleEntry? As Candlestick is always Date sensitive , I would also like to suggest to set XVal as Calendar object instance to enable better data range selection as in this issue shared here

Upvotes: 1

Views: 1897

Answers (1)

Vickute
Vickute

Reputation: 46

I want to create a chart like this link:

https://i.sstatic.net/gaifF.jpg

when I enter data in one year, in XAxis it displays the date and it's automatically split into multiple columns more

I want it displayed in months, split into 12 columns, you know how to do it?

Upvotes: 0

Related Questions