I need help with two issues:
a) how to add to label date - i have a dictionary in Python from which I get data for values (USD value) and axis x (day of week) and axis y (week number). And label has format Number of week, date and value in USD. And from dictionary I would like to add date as second row to label with particular date. Do not know JS, so not able to create a function for that, how to get from my dictionary dates - values for key "date".
b) cell color based value - gradient color red for negative and blue for positive numbers. I used stops, but I have to add stop manually for 0 (white). But I would like to have it automaticly based on values scale from most negative red to most positve blue and 0 as white.
Thanks a lot for any help.
Code for values:
Code: Select all
series: [{
name: 'Results per WeekDay',
borderWidth: 1,
data: [{% for row in qs_heatmap_chart %}[{{ row.x }}, {{ row.y }}, {{ row.value }}],{% endfor %}],
dataLabels: {
enabled: true,
color: '#000000'
}
}],
https://jsfiddle.net/ladispavel/seuk95yL/10/
Thanks, Ladislav