We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fb51e8 commit c74839aCopy full SHA for c74839a
src/Histogram.js
@@ -18,8 +18,10 @@ class Histogram extends Component{
18
19
formatHistogram(histogram) {
20
return Object.keys(histogram).sort().map(x => {
21
+ let now = new Date();
22
+ let offset = now.getTimezoneOffset();
23
return {
- 'name': x,
24
+ 'name': ((parseInt(x) - offset/60 + 24) % 24).toString(),
25
'count': histogram[x]
26
}
27
})
@@ -37,7 +39,7 @@ class Histogram extends Component{
37
39
<YAxis />
38
40
<Tooltip />
41
<Legend />
- <Bar dataKey="count" name="All FEC over limit events in this hour" fill="#8884d8" />
42
+ <Bar dataKey="count" name="Hourly FEC over limit histogram" fill="#8884d8" />
43
</BarChart>
44
</ResponsiveContainer>
45
</div>)
0 commit comments