From a877f45471b5840632e0b683ea3961eab9b1bc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Thu, 20 Sep 2018 16:21:03 +0200 Subject: [PATCH] Change default date format for chart tooltips (https://github.com/woocommerce/woocommerce-admin/pull/459) --- plugins/woocommerce-admin/client/components/chart/README.md | 2 +- plugins/woocommerce-admin/client/components/chart/charts.js | 2 +- plugins/woocommerce-admin/client/components/chart/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce-admin/client/components/chart/README.md b/plugins/woocommerce-admin/client/components/chart/README.md index 220f6948648..d947227a707 100644 --- a/plugins/woocommerce-admin/client/components/chart/README.md +++ b/plugins/woocommerce-admin/client/components/chart/README.md @@ -51,6 +51,6 @@ Name | Type | Default | Description `dateParser` | `string` | `%Y-%m-%dT%H:%M:%S` | Format to parse datetimes in the data `type`* | `string` | `line` | Chart type of either `line` or `bar` `title` | `string` | none | Chart title -`tooltipFormat` | `string` | `%Y-%m-%d` | Title and format of the tooltip title +`tooltipFormat` | `string` | `%B %d, %Y` | Title and format of the tooltip title `xFormat` | `string` | `%Y-%m-%d` | d3TimeFormat of the x-axis values `yFormat` | `string` | `.3s` | d3Format of the y-axis values diff --git a/plugins/woocommerce-admin/client/components/chart/charts.js b/plugins/woocommerce-admin/client/components/chart/charts.js index 67d40f643a4..13d8aedef2a 100644 --- a/plugins/woocommerce-admin/client/components/chart/charts.js +++ b/plugins/woocommerce-admin/client/components/chart/charts.js @@ -254,7 +254,7 @@ D3Chart.defaultProps = { top: 20, }, layout: 'standard', - tooltipFormat: '%Y-%m-%d', + tooltipFormat: '%B %d, %Y', type: 'line', width: 600, xFormat: '%Y-%m-%d', diff --git a/plugins/woocommerce-admin/client/components/chart/index.js b/plugins/woocommerce-admin/client/components/chart/index.js index 22f0eee380a..17d3f62010a 100644 --- a/plugins/woocommerce-admin/client/components/chart/index.js +++ b/plugins/woocommerce-admin/client/components/chart/index.js @@ -332,7 +332,7 @@ Chart.propTypes = { Chart.defaultProps = { data: [], dateParser: '%Y-%m-%dT%H:%M:%S', - tooltipFormat: '%Y-%m-%d', + tooltipFormat: '%B %d, %Y', xFormat: '%d', x2Format: '%b %Y', yFormat: '$.3s',