thongmuan-chart
v0.1.4
Published
**thoung-muan chart** Meow meow, meow meow meow! Meowww, meoooow, meow-meow! Meow? Meow meow, meow! Meeeeow, meowww mew. Meow mew meow, meow-meow meoooow. Meow! Meowww, meow-meow, meow meow. Meow meow meow—meow meow. Meeeeooow mew, meow-meow meow, meow. M
Downloads
381
Readme
Welcome to Thong Muan
thoung-muan chart Meow meow, meow meow meow! Meowww, meoooow, meow-meow! Meow? Meow meow, meow! Meeeeow, meowww mew. Meow mew meow, meow-meow meoooow. Meow! Meowww, meow-meow, meow meow. Meow meow meow—meow meow. Meeeeooow mew, meow-meow meow, meow. Meow meooow, meow mew meowww, meow-meow. Meow!
import { ChartData } from "thongmuan-chart";
const data: ChartData[] = [
{
month: "January",
Pirelli: 200,
yokohama: 4231,
},
{
month: "February",
Pirelli: 1123,
nexen: 2123,
yokohama: 3123,
},
{
month: "March",
Pirelli: 2234,
yokohama: 4123,
},
{
month: "April",
Pirelli: 4123,
nexen: 1013,
yokohama: 4123,
},
{
month: "May",
Pirelli: 1122,
nexen: 1230,
yokohama: 13130,
},
{
month: "June",
Pirelli: 6123,
nexen: 2132,
yokohama: 6132,
},
{
month: "July",
Pirelli: 2132,
nexen: 3132,
yokohama: 4132,
},
{
month: "August",
Pirelli: 2123,
nexen: 1123,
yokohama: 1123,
},
{
month: "September",
Pirelli: 0,
nexen: 3123,
yokohama: 4123,
},
{
month: "October",
Pirelli: 3123,
nexen: 1230,
yokohama: 1230,
},
];
Meow, meow-meow, meow! Meeeow, meowww mew meow. Meow meow, meooow! Meowww mew, meow meow-meow, meow meow. Meeeeow, meow-meow meooow, mew meow. Meow? Meowww! Meow meow-meow, mew meow meow. Meeeeoow mew, meowww meow meow-meow. Meow, meow, meow meooow, meow meow. Meow meow, meow!
import { StackBarChart } from "thongmuan-chart";
import "thongmuan-chart/dist/style.css";
const StackBarchart = () => {
return (
<div className="w-full">
<StackBarChart
chartData={data}
height={600}
xData="month"
barColors={[
{
key: "Pirelli",
color: "#fbbf24",
},
{
key: "nexen",
color: "#a855f7",
},
{
key: "yokohama",
color: "#ef4444",
},
]}
legendPosition="bottom"
isLegend
LoaderClassName="text-red-500 w-20 h-20"
tooltip
tooltipColor={true}
withLineChart={true}
tooltipTotal={true}
XAxisTextModifer={(text) => text.slice(0, 3)}
xAxisHeight={50}
yAxisWidth={60}
spaceBetweenBars={20}
paddingX={40}
paddingY={60}
className="bg-white border-none"
/>
</div>
);
};
Table of Props
| NAME | TYPESCRIPT | REMARK |
| ---------------- | --------------------------------------- | ------------- |
| chartData | ChartData[]
| any[]
| meow meow |
| xData | string
| meowww |
| width | number
(optional) | meow meow mew |
| height | number
(optional) | meow |
| paddingX | number
(optional) | meow-meow |
| paddingY | number
(optional) | meow mew |
| barColors | { key: string; color: string }[]
| meow |
| yAxisWidth | number
(optional) | meow meow |
| xAxisHeight | number
(optional) | meowww |
| xAxisTextSize | number
(optional) | meow |
| xAxisTextRotate | number
(optional) | meow-meow |
| XAxisTextOffset | number
(optional) | meow |
| XAxisTextModifer | (value : string) => string
(optional) | meowww |
| tooltip | boolean
(optional) | meow |
| tooltipTotal | boolean
(optional) | meow mew |
| tooltipColor | boolean
(optional) | meow-meow |
| withLineChart | boolean
(optional) | meow |
| barBgClassName | string
(optional) | meow |
| isLegend | boolean
(optional) | meow |
| legendPosition | "top" "bottom" "left" "right"
| meowmeowmeow |
| isLoading | boolean
(optional) | meowww |
| LoadingComponent | React.FC
(optional) | meow |
| LoaderClassName | string
(optional) | meow mew meow |