chartjs-chart-financial icon indicating copy to clipboard operation
chartjs-chart-financial copied to clipboard

[FEATURE] data as arrays

Open tapir opened this issue 7 years ago • 1 comments

Most of the libraries I've seen for candlestick uses this format for the dataset (including google charts and highcharts)

[
		[1272844800000,37.69,38.27,37.55,38.05],
		[1272931200000,37.58,37.61,36.68,36.95],
		[1273017600000,36.15,36.88,35.53,36.57],
		[1273104000000,36.26,36.89,28.46,35.18],
		[1273190400000,34.82,35.22,32.17,33.69],
		[1273449600000,35.75,36.38,35.50,36.28],
		[1273536000000,35.98,37.13,35.79,36.65],
		[1273622400000,37.04,37.59,36.96,37.44],
		[1273708800000,37.60,37.86,36.63,36.91],
		[1273795200000,36.45,36.64,35.64,36.26],
		[1274054400000,36.39,36.60,35.39,36.32],
		[1274140800000,36.71,36.94,35.75,36.05],
		[1274227200000,35.64,36.13,34.98,35.48],
		[1274313600000,34.55,34.84,33.74,33.97],
		[1274400000000,33.26,34.93,33.05,34.62],
		[1274659200000,35.33,35.84,35.18,35.25],
		[1274745600000,34.19,35.25,33.88,35.03],
		[1274832000000,35.73,36.02,34.82,34.87],
		[1274918400000,35.80,36.27,35.59,36.19],
		[1275004800000,37.06,37.06,36.19,36.70]
]

which is timestamp, o, h, l, c. The way you have all rows as an objects means that most of the time the data coming from the database have to be refromated.

tapir avatar Apr 30 '17 14:04 tapir

I would be happy to support this. However, it would need to first be supported in the core library. I've filed the linked issue in the core library to track support for such a feature. Please feel free to send a pull request

benmccann avatar Aug 02 '17 03:08 benmccann