fix: image editor fit view incorrect, do not query gguf files when gguf unchecked
This commit is contained in:
@@ -41,18 +41,23 @@ export default function useChartConfig() {
|
||||
borderColor: 'transparent',
|
||||
formatter(params: any, callback?: (val: any) => any) {
|
||||
let result = `<span class="tooltip-x-name">${params[0].axisValue}</span>`;
|
||||
|
||||
params.forEach((item: any) => {
|
||||
let value = isFunction(callback)
|
||||
? callback?.(item.data.value)
|
||||
: item.data.value;
|
||||
|
||||
const borderRadius = item.seriesType === 'bar' ? '2px' : '8px';
|
||||
|
||||
result += `<span class="tooltip-item">
|
||||
<span class="tooltip-item-name">
|
||||
<span style="display:inline-block;margin-right:5px;border-radius:8px;width:8px;height:8px;background-color:${item.color};"></span>
|
||||
<span class="tooltip-title">${item.seriesName}</span>:
|
||||
</span>
|
||||
<span class="tooltip-value">${value}</span>
|
||||
<span class="tooltip-item-name">
|
||||
<span style="display:inline-block;margin-right:5px;border-radius:${borderRadius};width:8px;height:8px;background-color:${item.color};"></span>
|
||||
<span class="tooltip-title">${item.seriesName}</span>:
|
||||
</span>
|
||||
<span class="tooltip-value">${value}</span>
|
||||
</span>`;
|
||||
});
|
||||
|
||||
return `<div class="tooltip-wrapper">${result}</div>`;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -43,7 +43,11 @@ const MixLineBarChart: React.FC<
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
grid,
|
||||
grid: {
|
||||
...grid,
|
||||
top: 20,
|
||||
bottom: 20
|
||||
},
|
||||
tooltip: {
|
||||
...tooltip,
|
||||
formatter(params: any) {
|
||||
@@ -62,7 +66,10 @@ const MixLineBarChart: React.FC<
|
||||
yAxis,
|
||||
legend: {
|
||||
...legend,
|
||||
data: legendData
|
||||
data: legendData,
|
||||
itemGap: 20,
|
||||
bottom: 5,
|
||||
show: false
|
||||
},
|
||||
|
||||
series: []
|
||||
|
||||
Reference in New Issue
Block a user