Skip to content

Commit

Permalink
Changed time unit formatting. Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew.hurskiy committed May 30, 2017
1 parent 7254e90 commit db3bdbd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/core/core.scale.js
Expand Up @@ -687,8 +687,7 @@ module.exports = function(Chart) {
// Add bold style to major units
var tickMoment = moment(me.ticksAsTimestamps[index]);
var tickMomentClone = tickMoment.clone();
if (me.majorUnit &&
tickMoment.valueOf() === tickMomentClone.startOf(me.majorUnit).valueOf()) {
if (me.majorUnit && tickMoment.valueOf() === tickMomentClone.startOf(me.majorUnit).valueOf()) {
font = majorTickFont;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/scales/scale.time.js
Expand Up @@ -25,7 +25,7 @@ module.exports = function(Chart) {
displayFormats: {
millisecond: 'h:mm:ss.SSS a', // 11:20:01.123 AM,
second: 'h:mm:ss a', // 11:20:01 AM
minute: 'h:mm:ss a', // 11:20:01 AM
minute: 'h:mm a', // 11:20 AM
hour: 'hA', // 5PM
day: 'MMM D', // Sep 4
week: 'll', // Week 46, or maybe "[W]WW - YYYY" ?
Expand Down
2 changes: 1 addition & 1 deletion test/specs/scale.time.tests.js
Expand Up @@ -96,7 +96,7 @@ describe('Time scale tests', function() {
displayFormats: {
millisecond: 'h:mm:ss.SSS a', // 11:20:01.123 AM
second: 'h:mm:ss a', // 11:20:01 AM
minute: 'h:mm:ss a', // 11:20:01 AM
minute: 'h:mm a', // 11:20 AM
hour: 'hA', // 5PM
day: 'MMM D', // Sep 4
week: 'll', // Week 46, or maybe "[W]WW - YYYY" ?
Expand Down

0 comments on commit db3bdbd

Please sign in to comment.