html encoder for currency symbols

This commit is contained in:
Robert Elliott 2018-09-12 13:16:44 +02:00
parent a7ed5f0c85
commit b276750955
3 changed files with 16 additions and 9 deletions

View File

@ -164,14 +164,14 @@
padding-top: 10px;
stroke-width: 1;
}
.axis-month {
.tick {
opacity: 0;
&:first-child {
opacity: 1;
}
}
}
// .axis-month {
// .tick {
// opacity: 0;
// &:first-child {
// opacity: 1;
// }
// }
// }
.y-axis {
text-anchor: start;
&.tick {

View File

@ -240,7 +240,10 @@ export const drawAxis = ( node, params ) => {
.call(
d3AxisBottom( xScale )
.tickValues( params.uniqueDates.map( d => ( params.type === 'line' ? new Date( d ) : d ) ) )
.tickFormat( d => params.x2Format( d instanceof Date ? d : new Date( d ) ) )
.tickFormat( ( d, i ) => {
const monthDate = d instanceof Date ? d : new Date( d );
return monthDate.getDate() === 1 || i === 0 ? ( d = params.x2Format( monthDate ) ) : '';
} )
)
.call( g => g.select( '.domain' ).remove() );

View File

@ -408,7 +408,11 @@ export function getDateFormatsForInterval( interval ) {
xFormat = '%I %p';
tableFormat = 'h A';
break;
case 'day':
xFormat = '%d';
break;
case 'week':
xFormat = '%d';
tooltipFormat = __( 'Week of %B %d %Y', 'wc-admin' );
break;
case 'quarter':