laka
Posts: 3
Joined: Sun Aug 28, 2022 8:20 am

Empty points

Hello,

I'm sorry, I speak a little English.

This is nice: /stock/demo/basic-line

I would like see the August month. Every day/point. So, I would like see 1-31 days at bottom and I would like see only the first week points:

Code: Select all

var data = [
[1659333600000,125.01], // aug 1
[1659420000,124.81], // aug 2
[1659506400,126.31], // aug 3
[1659592800,123.05], // aug 4
[1659679200,122.12], // aug 5
[1659765600,125.44], // aug 6
[1659852000,129.20], // aug 7
[], // aug 8
[], // aug 9
[], // aug 10
[], // aug 11
[], // aug 12
[], // aug 13
[], // aug 14
[], // aug 15
[], // aug 16
[], // aug 17
[], // aug 18
[], // aug 19
[], // aug 20
[], // aug 21
[], // aug 22
[], // aug 23
[], // aug 24
[], // aug 25
[], // aug 26
[], // aug 27
[], // aug 28
[], // aug 29
[], // aug 30
[], // aug 31
];
How to?
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Empty points

Hello,
I would like see the August month. Every day/point. So, I would like see 1-31 days at bottom
You can achieve this by set min and max on xAxis. And to show empty points is used xAxis.ordinal property.
I would like see only the first week points
You can do this by using the setExtremes() method in the load() callback function.

Demo: https://jsfiddle.net/BlackLabel/qbmfrc8s/
API: https://api.highcharts.com/highstock/xAxis.min
https://api.highcharts.com/highstock/xAxis.max
https://api.highcharts.com/highstock/xAxis.ordinal
https://api.highcharts.com/highstock/chart.events.load
https://api.highcharts.com/class-refere ... etExtremes

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
Steven7
Posts: 1
Joined: Mon Aug 29, 2022 8:29 am
Contact: Website

Re: Empty points

Hello,

Thanks for the tip on setExtremes(), it works very well.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Empty points

That's great to hear!

Welcome to our forum Steven!
In case of any questions, feel free to contact us.

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Stock”