diff --git a/src/_components/boxChart/BoxDoughnutBarChart.js b/src/_components/boxChart/BoxDoughnutBarChart.js index 3a0f49b..b123ac9 100644 --- a/src/_components/boxChart/BoxDoughnutBarChart.js +++ b/src/_components/boxChart/BoxDoughnutBarChart.js @@ -71,7 +71,7 @@ export default function BoxDoughnutBarChart({ {subTitleLine &&

{subTitleLine}

} {dataBarChart.length > 0 ? (
-
+
diff --git a/src/_components/boxChart/boxChart.scss b/src/_components/boxChart/boxChart.scss index 4c65b41..7ed3da6 100644 --- a/src/_components/boxChart/boxChart.scss +++ b/src/_components/boxChart/boxChart.scss @@ -60,13 +60,13 @@ } .chart-container { - overflow-x: scroll; + // overflow-x: scroll; height: 100%; - width: 300px; + // width: 300px; - @media (max-width: 1750px) { - max-width: 240px; - } + // @media (max-width: 1750px) { + // max-width: 240px; + // } } } diff --git a/src/_components/chart/VerticalBarChart.js b/src/_components/chart/VerticalBarChart.js index 8ab228e..cae859f 100644 --- a/src/_components/chart/VerticalBarChart.js +++ b/src/_components/chart/VerticalBarChart.js @@ -15,7 +15,8 @@ export function VerticalBarChart({data = [], labels = []}) { maxValue = item; } }) - // labels = labels?.map((item) => item.replace('Tuần', 'W')); + + labels = labels?.map(week => week.split(" ")); const options = { responsive: true, @@ -24,15 +25,21 @@ export function VerticalBarChart({data = [], labels = []}) { legend: { display: false }, + // title: { + // display: true, + // text: 'Tuần', + // align: 'start', + // position: 'bottom', + // }, datalabels: { - anchor: 'end', // Position of the labels (start, end, center, etc.) - align: 'end', // Alignment of the labels (start, end, center, etc.) - color: 'blue', // Color of the labels + anchor: 'end', + align: 'end', + color: 'blue', font: { weight: 'bold', }, formatter: function (value, context) { - return value; // Display the actual data value + return value; } } }, @@ -40,7 +47,6 @@ export function VerticalBarChart({data = [], labels = []}) { x: { ticks: { maxRotation: 0, - // scrollX : true, }, }, y: {