You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/04/13 06:32:16 UTC

[GitHub] [incubator-echarts] wulamao opened a new issue #10283: scatter3D与2D使用同一组数据,它们的数据视图显示的category不一样

wulamao opened a new issue #10283: scatter3D与2D使用同一组数据,它们的数据视图显示的category不一样
URL: https://github.com/apache/incubator-echarts/issues/10283
 
 
   ## **One-line summary [问题简述]**
   您好,我绘制了一个3D散点图和一个2D图,它们使用了同一个dataset,dataset数据模型为[[value,value,categorise],...]。在数据视图中它们显示category的地方不一致,3D图中顺序显示0,1,2...,而2D显示为正常的category(字符串)。
   ## **Version & Environment [版本及环境]**
   ECharts version [ECharts 版本]:ECharts GL 1.1.1,ECharts 4.2.1
   Browser version [浏览器类型和版本]:Chrome内核
   OS Version [操作系统类型和版本]:Win10专业版
   ## **Expected behaviour [期望结果]**
   3D数据视图显示字符
   
   ## **ECharts option [ECharts配置项]**
   ```js
   var option = {
               visualMap: [{
                  top: 10,
                  tooltip: {trigger: 'item'},
                  type: 'piecewise',
                  dimension: 2, 
                  categories: tips,
                  inRange: {
                       color: colorTips,
                  },
                  outOfRange: {
                       symbolSize: [5],
                       color: ['#000']
                  },
                  textStyle: {
                      color: '#000'
                  }
               }],
               grid3D: {
                   width: '45%',
                   height: '100%',
                   left: '5%',
                   bottom: '15%',
                   axisLine: {
                       lineStyle: {
                           color: '#000'
                       }
                   },
                   axisPointer: {
                       lineStyle: {
                           color: '#ffbd67'
                       }
                   },
                   viewControl: {
                       autoRotate: false,
                       projection: 'orthographic',//'perspective'
                       orthographicSize: 200,
                       maxorthographicSize: 400,
                       minorthographicSize: 40,
                   },
                   tooltip: {
                       trigger: 'item'
                   },
               },
               xAxis3D: {name: config.xtext},
               yAxis3D: {
                           name: config.ytext,
                           type: 'category',
                           data: tips,
                         },
               zAxis3D: {name: config.ztext},
               dataset: {
                   dimensions: [
                       'Distance',
                       'RSSI',
                       {name: 'Mark', type: 'ordinal'},
                   ],
                   source: data
               },
               grid: [
                       {width: '30%', left: '60%'},
                   ],
                   legend: {
                       data: ['Data']
                   },
                   toolbox: {
                       left: 'center',
                       show: true,
                       feature: {
                           mark: { show: true },
                           dataZoom: { show: true },
                           dataView: { show: true, readOnly: false },
                           restore: { show: true },
                       }
                   },
                   tooltip: {
                       trigger: 'item'
                   },
                   xAxis: [
                       {type: 'value', name: config.xtext},
                   ],
                   yAxis: [
                       {type: 'value', name: config.ztext},
                   ],
               series: [
               {
                   id: 'scatter3D',
                   name: 'scatter3D',
                   type: 'scatter3D',
                   symbolSize: symbolSize,
                   encode: {
                       x: config.xtext,
                       y: 'Mark',//config.ytext,
                       z: config.ztext,
                       tooltip: [0, 1, 2]
                   }
               },
               {
                   id: 'scatter',
                   name: 'scatter',
                   type: 'scatter',
                   symbolSize: symbolSize,
                   markPoint: {
                       symbolSize: symbolSize+5,
                       data: [
                           { type: 'max', name: '最大值' },
                           { type: 'min', name: '最小值' }
                       ]
                   },
                   markLine: {
                       data: [
                           { type: 'average', name: '平均值' }
                       ]
                   },
                   encode: {
                       x: config.xtext,
                       y: config.ztext,
                       tooltip: [0, 1, 2]
                   }
               }],
               dataZoom:[{
                   type: 'inside',
                   show: true,
                   xAxisIndex: [0],
                   realtime: true,
               }],
               toolbox: {
                   feature: {
                       dataZoom: {
                       },
                       restore: {},
                       magicType: {
                       },
                       dataView: {},
                   },
               },
           };
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org