Open Lloeaf opened 7 months ago
let pieOption1 = { grid: { left: '19%', // 调整xAxis的宽度,可以根据实际情况调整具体数值 right: '10%' // 调整xAxis的宽度,可以根据实际情况调整具体数值 }, title: { text: ${dataval.title} ${PluginStrings.unit}, subtext: dataval.subtext, textStyle: { color: DarkMode.getColorScheme() === 'dark' ? '#ffffff' : '#000000' } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, // formatter: function (params) { // return ${params[0].name}: ${params[0].value} ${params[0].seriesName}; // } }, xAxis: { type: 'category', data: dataval.xAxisdata, nameLocation: 'start', axisLabel: { interval: dataval.xAxisdata.length <= 7 ? 0 : 'auto' } }, yAxis: { type: 'value', axisLabel: { interval: 1 } }, series: [ { name: PluginStrings.unit, data: dataval.seriesdata, type: 'bar', barWidth: "40%", nameLocation: "start", itemStyle: { color: '#3398DB' // 将柱子颜色改为绿色 } } ] }; return <View style={{ height: 'auto', paddingTop: 20, marginLeft: SdkStyles.common.padding, width: Ratio.width - (SdkStyles.common.padding * 1), alignItems: 'center', justifyContent: 'center' }}>
${dataval.title} ${PluginStrings.unit}
${params[0].name}: ${params[0].value} ${params[0].seriesName}
</View>;
dataval 参数方便提供一下吗?
let pieOption1 = { grid: { left: '19%', // 调整xAxis的宽度,可以根据实际情况调整具体数值 right: '10%' // 调整xAxis的宽度,可以根据实际情况调整具体数值 }, title: { text:
${dataval.title} ${PluginStrings.unit}
, subtext: dataval.subtext, textStyle: { color: DarkMode.getColorScheme() === 'dark' ? '#ffffff' : '#000000' } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, // formatter: function (params) { // return${params[0].name}: ${params[0].value} ${params[0].seriesName}
; // } }, xAxis: { type: 'category', data: dataval.xAxisdata, nameLocation: 'start', axisLabel: { interval: dataval.xAxisdata.length <= 7 ? 0 : 'auto' } }, yAxis: { type: 'value', axisLabel: { interval: 1 } }, series: [ { name: PluginStrings.unit, data: dataval.seriesdata, type: 'bar', barWidth: "40%", nameLocation: "start", itemStyle: { color: '#3398DB' // 将柱子颜色改为绿色 } } ] }; return <View style={{ height: 'auto', paddingTop: 20, marginLeft: SdkStyles.common.padding, width: Ratio.width - (SdkStyles.common.padding * 1), alignItems: 'center', justifyContent: 'center' }}>