-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
937 additions
and
203 deletions.
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
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
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,47 @@ | ||
import { BarChart, type BarChartProps } from "../../dist/Chart/BarChart"; | ||
import { getStoryFactory } from "../getStory"; | ||
import { sectionName } from "./sectionName"; | ||
|
||
const { meta, getStory } = getStoryFactory<BarChartProps>({ | ||
sectionName: sectionName, | ||
"wrappedComponent": { BarChart }, | ||
"description": ` | ||
- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/composants-et-modeles/composants-beta/graphiques-charts/) | ||
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Chart/BarChart.tsx)`, | ||
"argTypes": { | ||
"x": { | ||
"description": "Array of value for the x axis" | ||
}, | ||
"y": { | ||
"description": "Array of value for the y axis" | ||
}, | ||
"name": { "description": "Array of name", control: "object" }, | ||
"color": { "description": "Array of color", control: "object" }, | ||
"horizontal": { | ||
"control": { "type": "boolean" } | ||
}, | ||
"stacked": { | ||
"control": { "type": "boolean" } | ||
}, | ||
"hline": { "description": "Array of horizontal lines to add", control: "object" }, | ||
"hlinename": { "description": "Name of the horizontal lines", control: "object" }, | ||
"vline": { "description": "Array of vertical lines to add", control: "object" }, | ||
"vlinename": { "description": "Name of the vertical lines", control: "object" }, | ||
"vlinecolor": { "description": "Color of the horizontal lines", control: "object" }, | ||
"hlinecolor": { "description": "Color of the vertical lines", control: "object" } | ||
}, | ||
"disabledProps": ["lang"] | ||
}); | ||
|
||
export default meta; | ||
|
||
export const Default = getStory({ | ||
"x": [ | ||
["A", "B"], | ||
["A", "B"] | ||
], | ||
"y": [ | ||
[100, 50], | ||
[20, 10] | ||
] | ||
}); |
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,39 @@ | ||
import { BarLineChart, type BarLineChartProps } from "../../dist/Chart/BarLineChart"; | ||
import { getStoryFactory } from "../getStory"; | ||
import { sectionName } from "./sectionName"; | ||
|
||
const { meta, getStory } = getStoryFactory<BarLineChartProps>({ | ||
sectionName: sectionName, | ||
"wrappedComponent": { BarLineChart }, | ||
"description": ` | ||
- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/composants-et-modeles/composants-beta/graphiques-charts/) | ||
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Chart/BarChart.tsx)`, | ||
"argTypes": { | ||
"x": { | ||
"description": "Array of value for the x axis" | ||
}, | ||
"y": { | ||
"description": "Array of value for the y axis" | ||
}, | ||
"ybar": { | ||
"description": "Array of value for the x axis to create the bars" | ||
}, | ||
"name": { "description": "Array of name", control: "object" }, | ||
"color": { "description": "Array of color", control: "object" }, | ||
"hline": { "description": "Array of horizontal lines to add", control: "object" }, | ||
"hlinename": { "description": "Name of the horizontal lines", control: "object" }, | ||
"vline": { "description": "Array of vertical lines to add", control: "object" }, | ||
"vlinename": { "description": "Name of the vertical lines", control: "object" }, | ||
"vlinecolor": { "description": "Color of the horizontal lines", control: "object" }, | ||
"hlinecolor": { "description": "Color of the vertical lines", control: "object" } | ||
}, | ||
"disabledProps": ["lang"] | ||
}); | ||
|
||
export default meta; | ||
|
||
export const Default = getStory({ | ||
"x": [1, 2, 3], | ||
"y": [30, 10, 20], | ||
"ybar": [20, 15, 12] | ||
}); |
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,35 @@ | ||
import { GaugeChart, type GaugeChartProps } from "../../dist/Chart/GaugeChart"; | ||
import { getStoryFactory } from "../getStory"; | ||
import { sectionName } from "./sectionName"; | ||
|
||
const { meta, getStory } = getStoryFactory<GaugeChartProps>({ | ||
sectionName: sectionName, | ||
"wrappedComponent": { GaugeChart }, | ||
"description": ` | ||
- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/composants-et-modeles/composants-beta/graphiques-charts/) | ||
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Chart/BarChart.tsx)`, | ||
"argTypes": { | ||
"value": { | ||
"description": "Current value" | ||
}, | ||
"init": { | ||
"description": "Base value" | ||
}, | ||
"target": { | ||
"description": "Target value" | ||
}, | ||
"color": { | ||
"description": "Color" | ||
} | ||
}, | ||
"disabledProps": ["lang"] | ||
}); | ||
|
||
export default meta; | ||
|
||
export const Default = getStory({ | ||
value: 16, | ||
init: 10, | ||
target: 20, | ||
color: "blue-france" | ||
}); |
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,35 @@ | ||
import { LineChart, type LineChartProps } from "../../dist/Chart/LineChart"; | ||
import { getStoryFactory } from "../getStory"; | ||
import { sectionName } from "./sectionName"; | ||
|
||
const { meta, getStory } = getStoryFactory<LineChartProps>({ | ||
sectionName: sectionName, | ||
"wrappedComponent": { LineChart }, | ||
"description": ` | ||
- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/composants-et-modeles/composants-beta/graphiques-charts/) | ||
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Chart/BarChart.tsx)`, | ||
"argTypes": { | ||
"x": { | ||
"description": "Array of value for the x axis" | ||
}, | ||
"y": { | ||
"description": "Array of value for the y axis" | ||
}, | ||
"name": { "description": "Array of name", control: "object" }, | ||
"color": { "description": "Array of color", control: "object" }, | ||
"hline": { "description": "Array of horizontal lines to add", control: "object" }, | ||
"hlinename": { "description": "Name of the horizontal lines", control: "object" }, | ||
"vline": { "description": "Array of vertical lines to add", control: "object" }, | ||
"vlinename": { "description": "Name of the vertical lines", control: "object" }, | ||
"vlinecolor": { "description": "Color of the horizontal lines", control: "object" }, | ||
"hlinecolor": { "description": "Color of the vertical lines", control: "object" } | ||
}, | ||
"disabledProps": ["lang"] | ||
}); | ||
|
||
export default meta; | ||
|
||
export const Default = getStory({ | ||
x: [1, 2, 3], | ||
y: [10, 20, 30] | ||
}); |
Oops, something went wrong.