chartjs / chartjs-chart-financial

Chart.js module for charting financial securities
MIT License
721 stars 196 forks source link

Custom Axis x #81

Closed StephaneAdeso closed 3 years ago

StephaneAdeso commented 3 years ago

short explanation: I need to configure the labels of my X axis manually and that the data that I pass to it adapts to that size automatically. If I have 4000 data in a line, that data adapt to the size of the X axis that I have made.

Long explanation: I am trying to show a line graph. The data I receive from my Rest service are sometimes values for every minute of the day, sometimes every 15 minutes, etc. And sometimes I can take several days at a time. So what I need is a graph that has a scale on the x-axis that makes 0H-6H-12H-18H-24H. And that is multiplied by each day. The data should fit the size of that graph. I have been looking for documentation for several hours but I have not had success finding an answer or solution. Attached image of how I would like it to be. Another solution that would also help me is to be able to manually pass an array of values to the x axis that I have created manually. The problem is that I don't know how to get the data to display without being anchored to the x-axis values. All the examples I've seen show that if you have 20 values, you must have 20 labels on the x-axis. I have made a drawing to illustrate what I am looking for 1

benmccann commented 3 years ago

This project is for showing stock charts. It won't plot a line chart