Created
March 14, 2023 09:25
-
-
Save hujuu/c6bf48d45be4914a851d543cfc9be958 to your computer and use it in GitHub Desktop.
victoryで箱ひげ図を書く
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
"use client"; | |
import React from "react"; | |
import { VictoryPie, VictoryChart, VictoryBoxPlot, VictoryTheme } from "victory"; | |
export default function PieChart(){ | |
return ( | |
<VictoryChart | |
domainPadding={20} | |
theme={VictoryTheme.grayscale}> | |
<VictoryBoxPlot | |
horizontal | |
boxWidth={10} | |
whiskerWidth={5} | |
data={[ | |
{ x: 1, y: [1, 2, 3, 5] }, | |
{ x: 2, y: [3, 2, 8, 10] }, | |
{ x: 3, y: [2, 8, 6, 5] }, | |
{ x: 4, y: [1, 3, 2, 9] } | |
]} | |
/> | |
</VictoryChart> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment