* Fix hourly labels in bar charts X-axis

* Add CHANGELOG comment

* Remove unnecessary date object call
This commit is contained in:
Albert Juhé Lluveras 2019-02-04 22:15:06 +01:00 committed by GitHub
parent 7916100009
commit 16ea4f60fc
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,7 @@
# 1.5.0 (unreleased)
- Fix X-axis labels in hourly bar charts.
- New `<Search>` prop named `showClearButton`, that will display a 'Clear' button when the search box contains one or more tags.
# 1.4.2
- Add emoji-flags dependency
@ -5,7 +9,6 @@
- Chart component: format numbers and prices using store currency settings.
- Make `href`/linking optional in SummaryNumber.
- Fix SummaryNumber example code.
- New `<Search>` prop named `showClearButton`, that will display a 'Clear' button when the search box contains one or more tags.
# 1.4.0
- Add download log ip address autocompleter to search component

View File

@ -210,7 +210,7 @@ export const drawAxis = ( node, params, xOffset ) => {
d3AxisBottom( xScale )
.tickValues( ticks )
.tickFormat( ( d, i ) => params.interval === 'hour'
? params.xFormat( d )
? params.xFormat( d instanceof Date ? d : moment( d ).toDate() )
: removeDuplicateDates( d, i, ticks, params.xFormat ) )
);