mirror of
https://github.com/coaidev/coai.git
synced 2025-06-06 13:50:25 +09:00
chore: update model chart style
This commit is contained in:
parent
b179be80ea
commit
3332a1a1c0
@ -32,6 +32,7 @@ function ModelChart({ labels, datasets, dark }: ModelChartProps) {
|
|||||||
const text = dark ? "#fff" : "#000";
|
const text = dark ? "#fff" : "#000";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
responsive: true,
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
stacked: true,
|
stacked: true,
|
||||||
@ -54,6 +55,7 @@ function ModelChart({ labels, datasets, dark }: ModelChartProps) {
|
|||||||
display: false,
|
display: false,
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
position: "right",
|
||||||
display: true,
|
display: true,
|
||||||
labels: {
|
labels: {
|
||||||
color: text,
|
color: text,
|
||||||
@ -79,7 +81,10 @@ function ModelChart({ labels, datasets, dark }: ModelChartProps) {
|
|||||||
<Loader2 className={`h-4 w-4 inline-block animate-spin`} />
|
<Loader2 className={`h-4 w-4 inline-block animate-spin`} />
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
<Bar id={`model-chart`} data={data} options={options} />
|
{
|
||||||
|
//@ts-ignore
|
||||||
|
<Bar id={`model-chart`} data={data} options={options} />
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user