Skip to content

Commit

Permalink
knob for yAxisFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Aug 11, 2022
1 parent 17b537e commit 9bcf219
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ export const Timeseries = ({ width, height }) => {
logAxis: boolean('Log axis', false),
xAxisTimeFormat: 'smart_date',
tooltipTimeFormat: 'smart_date',
yAxisFormat: '$,.2f',
yAxisFormat: select(
'y-axis format',
['$,.2f', 'SMART_NUMBER'],
'$,.2f',
),
yAxisTitle: text('Y Axis title', ''),
yAxisIndexB: select('yAxisIndexB', [0, 1], 1),
minorSplitLine: boolean('Query 1: Minor splitline', false),
Expand Down Expand Up @@ -142,7 +146,15 @@ export const WithNegativeNumbers = ({ width, height }) => (
'line',
),
xAxisTimeFormat: 'smart_date',
yAxisFormat: '$,.2f',
yAxisFormat: select(
'y-axis format',
{
'Original value': '~g',
'Smart number': 'SMART_NUMBER',
'(12345.432 => $12,345.43)': '$,.2f',
},
'$,.2f',
),
stack: true,
showValue: boolean('Query 1: Show Value', true),
showValueB: boolean('Query 2: Show Value', false),
Expand Down

0 comments on commit 9bcf219

Please sign in to comment.