ui: chart alignments

This commit is contained in:
nick-delirium 2025-02-10 17:16:41 +01:00
parent b04bcb935e
commit e6c7c43246
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
5 changed files with 4 additions and 12 deletions

View file

@ -54,7 +54,7 @@ function ORBarChart(props: BarChartProps) {
data: undefined,
name: props.label ?? 'Number of Sessions',
nameLocation: 'middle',
nameGap: 35,
nameGap: 45,
};
chart.setOption({

View file

@ -75,7 +75,7 @@ function ColumnChart(props: ColumnChartProps) {
type: 'value',
name: label ?? 'Total',
nameLocation: 'middle',
nameGap: 35,
nameGap: 45,
},
yAxis: {
type: 'category',

View file

@ -70,7 +70,7 @@ function ORLineChart(props: Props) {
yAxis: {
name: props.label ?? 'Number of Sessions',
nameLocation: 'middle',
nameGap: 35,
nameGap: 45,
},
tooltip: {
...defaultOptions.tooltip,

View file

@ -44,7 +44,7 @@ const defaultOptions = {
grid: {
bottom: 20,
top: 40,
left: 55,
left: 35,
right: 15,
containLabel: true,
},

View file

@ -315,7 +315,6 @@ function WidgetChart(props: Props) {
if (viewType === 'lineChart') {
return (
<div className='pt-3'>
<LineChart
chartName={_metric.name}
inGrid={!props.isPreview}
@ -328,12 +327,10 @@ function WidgetChart(props: Props) {
: 'Number of Users'
}
/>
</div>
);
}
if (viewType === 'areaChart') {
return (
<div className='pt-3'>
<LineChart
isArea
chartName={_metric.name}
@ -346,12 +343,10 @@ function WidgetChart(props: Props) {
: 'Number of Users'
}
/>
</div>
);
}
if (viewType === 'barChart') {
return (
<div className='pt-3'>
<BarChart
inGrid={!props.isPreview}
data={chartData}
@ -365,7 +360,6 @@ function WidgetChart(props: Props) {
: 'Number of Users'
}
/>
</div>
);
}
@ -389,7 +383,6 @@ function WidgetChart(props: Props) {
}
if (viewType === 'pieChart') {
return (
<div className='pt-3'>
<PieChart
inGrid={!props.isPreview}
data={chartData}
@ -400,7 +393,6 @@ function WidgetChart(props: Props) {
: 'Number of Users'
}
/>
</div>
);
}
if (viewType === 'progress') {