diff --git a/src/components/chart/rechartsTimeSeries.stories.tsx b/src/components/chart/rechartsTimeSeries.stories.tsx index 555f4da0..b6ade7fc 100644 --- a/src/components/chart/rechartsTimeSeries.stories.tsx +++ b/src/components/chart/rechartsTimeSeries.stories.tsx @@ -9,7 +9,11 @@ export default { timeSeries: { control: 'array', description: - 'Data to be displayed in the time series chart. The first field is used as the x-axis field. We currently support formatting timestamps in seconds and milliseconds. Other data types will be displayed as given. \n
```interface TimeSeriesData:{\n  timestamp: number\n  [key: string]: number\n}```
', + 'Data to be displayed in the time series chart. The first field is used as the x-axis field. We currently support formatting timestamps in seconds and milliseconds. Other data types will be displayed as given. \n
```interface TimeSeriesData {\n  timestamp: number\n  [key: string]: number\n}```
', + }, + chartContainerMargin: { + description: + 'Margin of chart container in pixel. For example, adding left margin could show larger numbers properly.\n
```interface Margin {\n  top?: number\n  right?: number\n  bottom?: number\n  left?: number\n}```
', }, }, parameters: { diff --git a/src/components/chart/rechartsTimeSeries.tsx b/src/components/chart/rechartsTimeSeries.tsx index c34dab66..ca00fc50 100644 --- a/src/components/chart/rechartsTimeSeries.tsx +++ b/src/components/chart/rechartsTimeSeries.tsx @@ -74,7 +74,7 @@ export interface RechartsTimeSeriesProps { width?: number /** Chart type toggle will be hidden if the value is true. */ disableChartTypeToggle?: boolean - /** Define the default chart type: 'line', 'bar', or 'area'. */ + /** Define the default chart type: `line`, `bar`, or `area`. */ defaultChartType?: TimeSeriesType /** Pass a function to format y-axis label. Make sure to use tooltipFormatter and yAxisTickFormatter together so that the numbers are uniform. */ yAxisTickFormatter?: (value: number) => string