Browse Source

饼图和legend靠近一点;

songjie/feature-20260120101758-dc后台
songjie 4 weeks ago
parent
commit
b65f73aab2
  1. 18
      src/views/PlatformData/UserLoginStats.vue

18
src/views/PlatformData/UserLoginStats.vue

@ -875,12 +875,12 @@ const updatePieChart = (chartRef, chartInstance, data) => {
const option = {
color: regionColors,
tooltip: { trigger: 'item' },
legend: { orient: 'vertical', right: '0%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
series: [
{
type: 'pie',
radius: '70%',
center: ['30%', '50%'],
center: ['50%', '50%'], //
data: data,
label: { show: false },
itemStyle: {
@ -1011,12 +1011,12 @@ const initCharts = () => {
chart.setOption({
color: regionColors,
tooltip: { trigger: 'item' },
legend: { orient: 'vertical', right: '10%', top: 'center' },
legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
series: [
{
type: 'pie',
radius: '80%',
center: ['40%', '50%'],
radius: '70%',
center: ['50%', '50%'],
data: [
{ value: 1048, name: '香港地区' },
{ value: 735, name: '新加坡地区' },
@ -1042,12 +1042,12 @@ const initCharts = () => {
chart.setOption({
color: regionColors,
tooltip: { trigger: 'item' },
legend: { orient: 'vertical', right: '0%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
series: [
{
type: 'pie',
radius: '70%',
center: ['30%', '50%'],
center: ['50%', '50%'],
data: [
{ value: 1048, name: '香港地区' },
{ value: 735, name: '新加坡地区' },
@ -1068,12 +1068,12 @@ const initCharts = () => {
chart.setOption({
color: regionColors,
tooltip: { trigger: 'item' },
legend: { orient: 'vertical', right: '0%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } },
series: [
{
type: 'pie',
radius: '70%',
center: ['30%', '50%'],
center: ['50%', '50%'],
data: [
{ value: 1048, name: '香港地区' },
{ value: 735, name: '新加坡地区' },

Loading…
Cancel
Save