I came across this highcharts heatmap and I am trying to convert if to a map with weekdays in X axis. This is what my data looks like:
Sun,18,35036
Fri,18,36644
Sun,16,25922
Fri,16,29407
Fri,15,22161
Fri,14,15978
Fri,13,11793
Fri,12,8362
Fri,11,5597
Fri,10,3945
Fri,6,7955
Here I have weekday, hour, value. How can I convert the monthly heatmap to weekly heatmap?
JSFiddle Monthly Heatmap
Related
I have some list of dates as categories for xAxis.
Example of collection : 2018-01-01, 2018-01-03, 2018-01-10, 2018-01-17, 2018-01-29;
I want to display on chart dates in format MMM yy (Jan 18)
So I've tried to group all this dates by this date format. As result I received only 1 item in collection which is logically. But on chart I saw labels like this
Jan 18, 1, 2, 3, 4
How to "group" values on chart to display only month labels?
Example what I have now https://jsfiddle.net/phwgo4jz/7/
You could use the dateTimeLabelFormats option of xAxis to format the label. Or simply set the type of xAxis to datetime. Highcharts scales the axis and inserts appropriate labels as required.
Here is the highcharts documentation : https://api.highcharts.com/highcharts/xAxis.dateTimeLabelFormats
Also a sample codepen with similar functionality as your requirement. Have a look
https://codepen.io/samuellawrentz/pen/XYVyNR?editors=1010
categories are basically just an information how to display labels and position ticks - the axis still behaves like a "normal" linear axis. Highcharts will fill the axis labels up with subsequent integers if you don't provide categories for all y positions.
You can use xAxis.labels.formatter to filter categories out:
formatter: function() {
return Number.isInteger(this.value) ? '' : this.value;
}
Live demo: https://jsfiddle.net/BlackLabel/ytoj9ng2/
API reference: https://api.highcharts.com/highcharts/xAxis.labels.formatter
I am trying to calculate the difference between the total of 2 stacked columns for which I am trying to access series data in tooltip formatter. Is there a way I can do that?
To assure time continuity, I convert NSDates of a time series into time interval, and use for scatterplot or bar chart. The problem now is that Saturdays and Sundays are also included in X axis scale.
I wonder if it is possible to excludes weekends from the axis scale, making Monday date a following day of Friday, while still sticking to the use of time interval.
I could use custom labeling, but my time series does not include all weekdays, and I still want all weekdays to be shown even if not include in the time series.
Thanks
Core Plot plot ranges always cover a continuous range of values. To cut out the weekends, you'll need to define a mapping between dates and the linear time scale of the plot that excludes the weekend dates. The mapping should be defined both ways (date to plot value and plot value to date) so you can label the axis.
My weather station collects every 15 minutes the current temperature. With Highcharts I created a chart to display the last 24h. So I pass all the 96 quarter-hourly values to the chart. This looks not so pretty. Instead I would just display the average of each hour.
Is it possible to display the average value for each hour based on a series of quarter-hourly values and leaving the calculation to Highcharts and not doing it myself?
You can use highstock which allows to use datagrouping.
My case: Plot a stockchart with stock data for 5 days without weekends displaying, each day should have equal space even though data can be irregular.
What i need to do is plot an xAxis with static intervals of one day, however i cant display weekends and the data can be very irregular between the days. I've tried tinkering with tickInterval, tickPositioner but so far no luck.
I can hide weekends with:
ordinal: true,
My current fiddle:
http://jsfiddle.net/svedino/h9448fk0/1/
Setting the ordinal to false gives me correct interval but with the weekends included.
An example of this kind of graph seems to be working can be found here:
https://www.avanza.se/aktier/om-aktien.html/229675/jays