用户
 找回密码
 立即注册

30

主题

67

帖子

1134

积分

金牌会员

Rank: 6Rank: 6

积分
1134
发表于 2022-5-24 20:19:47
请问是否某些类型的Echart图不支持?因为我从网站搬过来测试代码,第一个可以执行,第二个执行不了。请看下面:


        private void bchart可以生成()
        {


            eCharts1.Option = @"{
  title: {
    text: '设计',
    subtext: '测试',
    left: 'center'
  },
  tooltip: {
    trigger: 'item',
    formatter: '{a} <br/>{b} : {c} ({d}%)'
  },
  legend: {
    left: 'center',
    top: 'bottom',
    data: [
      'rose1',
      'rose2',
      'rose3',
      'rose4',
      'rose5',
      'rose6',
      'rose7',
      'rose8'
    ]
  },
  toolbox: {
    show: true,
    feature: {
      mark: { show: true },
      dataView: { show: true, readOnly: false },
      restore: { show: true },
      saveAsImage: { show: true }
    }
  },
  series: [
    {
      name: 'Area Mode',
      type: 'pie',
      radius: [20, 140],
      center: ['50%', '50%'],
      roseType: 'area',
      itemStyle: {
        borderRadius: 5
      },
      data: [
        { value: 30, name: '设计' },
        { value: 28, name: '校核' },
        { value: 26, name: '审查' },
        { value: 24, name: '关闭' },
        { value: 10, name: '新建' },
        { value: 20, name: 'rose 6' },
        { value: 18, name: 'rose 7' },
        { value: 16, name: 'rose 8' }
      ]
    }
  ]
}";
        }






        private void bchart不可以生成()
        {


            eCharts1.Option = @"{
  title: {
    text:


'Basic Radar Chart'
  },
  legend: {
    data: ['Allocated


BudgetSSS', 'bbbb']
  },
  radar: {
    // shape: 'circle',



   indicator: [
      { name: 'aaaaa', max: 6500 },
      


{ name: 'Administration', max: 16000 },
      { name:


'Information Technology', max: 30000 },
      { name:


'Customer Support', max: 38000 },
      { name:


'Development', max: 52000 },
      { name: 'Marketing',


max: 52000 } ,
      { name: '', max: 52000 },
      {


name: 'Marketing2', max: 25000 }
    ]
  },
  series: [
   


{
      name: 'Budget vs spending',
      type: 'radar',
   


   data: [
        {
          value: [4200, 3000, 20000,


35000, 50000, 18000, 50000, 18000],
          name:


'Allocated Budget2222'
        },
        {
         


value: [5000, 14000, 28000, 26000, 42000, 21000, 42000,


21000],
          name: 'Actual Spending'
        },
      


{
          value: [3000, 14000, 28000, 2000, 42000,


21000, 1000, 21000],
          name: 'Actual Spending'
   


    }
      ]
    }
  ]
}";
        }


网站上测试两种是都可以的:


https://echarts.apache.org/examples/zh/editor.html?


c=radar




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
分享至 : QQ空间
0 人收藏
使用道具 举报 回复
发表于 2022-5-24 20:28:13
本帖最后由 zoomify 于 2022-5-24 20:30 编辑

不是上面两个,是散点图不行。
使用道具 举报 回复 支持 反对
发表于 2022-5-24 20:36:44
option = {
  xAxis: {},
  yAxis: {
    scale: true
  },
  series: [
    {
      name: '1990',
      data:  [[28604, 77, 17096869, 'Australia', 1990], [31163, 77.4, 27662440, 'Canada', 1990], [1516, 68, 1154605773, 'China', 1990], [13670, 74.7, 10582082, 'Cuba', 1990], [28599, 75, 4986705, 'Finland', 1990], [29476, 77.1, 56943299, 'France', 1990], [31476, 75.4, 78958237, 'Germany', 1990], [28666, 78.1, 254830, 'Iceland', 1990], [1777, 57.7, 870601776, 'India', 1990], [29550, 79.1, 122249285, 'Japan', 1990], [2076, 67.9, 20194354, 'North Korea', 1990], [12087, 72, 42972254, 'South Korea', 1990], [24021, 75.4, 3397534, 'New Zealand', 1990], [43296, 76.8, 4240375, 'Norway', 1990], [10088, 70.8, 38195258, 'Poland', 1990], [19349, 69.6, 147568552, 'Russia', 1990], [10670, 67.3, 53994605, 'Turkey', 1990], [26424, 75.7, 57110117, 'United Kingdom', 1990], [37062, 75.4, 252847810, 'United States', 1990]],
      type: 'scatter',
      symbolSize: function (data) {
        return Math.sqrt(data[2]) / 5e2;
      },
      emphasis: {
        focus: 'self'
      },
      labelLayout: {
        y: 20,
        align: 'center',
        hideOverlap: true,
        moveOverlap: 'shiftX'
      },
      labelLine: {
        show: true,
        length2: 5,
        lineStyle: {
          color: '#bbb'
        }
      },
      label: {
        show: true,
        formatter: function (param) {
          return param.data[3];
        },
        minMargin: 10,
        position: 'top'
      }
    }
  ]
};
使用道具 举报 回复 支持 反对
发表于 2022-5-25 10:01:55
我们会排查这个问题的,有结果后再会回复
使用道具 举报 回复 支持 反对
发新帖
您需要登录后才可以回帖 登录 | 立即注册