This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show only necessary tick labels on log scale (#19)
* fix: show only necessary ticks on log scale and add storybook * fix: storybook path
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...s/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/LogStories.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-disable no-magic-numbers */ | ||
import React from 'react'; | ||
import { SuperChart } from '@superset-ui/chart'; | ||
import data from './data'; | ||
|
||
export default [ | ||
{ | ||
renderStory: () => ( | ||
<SuperChart | ||
chartType="line" | ||
chartProps={{ | ||
datasource: { verboseMap: {} }, | ||
formData: { | ||
richTooltip: true, | ||
vizType: 'line', | ||
yAxisBounds: [1, 60000], | ||
yAxisFormat: ',d', | ||
yLogScale: true, | ||
}, | ||
height: 400, | ||
payload: { data }, | ||
width: 400, | ||
}} | ||
/> | ||
), | ||
storyName: 'Log scale', | ||
storyPath: 'legacy-|preset-chart-nvd3|LineChartPlugin', | ||
}, | ||
]; |
3 changes: 2 additions & 1 deletion
3
packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { LineChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3'; | ||
import Stories from './Stories'; | ||
import YAxisStories from './YAxisStories'; | ||
import LogStories from './LogStories'; | ||
|
||
new LineChartPlugin().configure({ key: 'line' }).register(); | ||
|
||
export default { | ||
examples: [...Stories, ...YAxisStories], | ||
examples: [...Stories, ...YAxisStories, ...LogStories], | ||
}; |