417606028 commented on issue #7653: 使用图表类型为‘tree’ URL: https://github.com/apache/incubator-echarts/issues/7653#issuecomment-379608575 复制错了,我的配置如下: that.treeSource = { title: { text: that.dataSource.name, left: 'center' }, // symbol: '/assets/img/symbol/level_02.jpg', tooltip: { trigger: 'item', triggerOn: 'mousemove', position: function (point, params, dom, rect, size) { // 固定在顶部 return [point[0] - 20, point[1] + 40] }, formatter: function (params) { // console.log(params) if (params.data.children.length) { return '点击查看 ' + params.name + '分支的技能点列表' } return '点击查看' + params.name + '的详情' } }, toolbox: { right: '5%', feature: { saveAsImage: {} } }, series: [ { type: 'tree', initialTreeDepth: 10, // 默认展开几层 data: [JSON.parse(that.dataSource.str)[0]], left: '10%', right: '40%', top: '10%', bottom: '10%', // symbol: '/assets/img/symbol/level_02.jpg', symbol: 'emptyCircle', symbolSize: 12, // orient: 'vertical', lineStyle: { normal: { curveness: 0.7 } }, label: { normal: { position: 'right', rotate: 0, verticalAlign: 'center', align: 'left', fontSize: 12, offset: [0, 0], padding: 4 } }, leaves: { label: { normal: { // position: 'bottom', // rotate: 0, // verticalAlign: 'middle', // align: 'right', // fontSize: 12, // offset: [20, -10] } } }, animationDurationUpdate: 750 } ] }
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For additional commands, e-mail: dev-h...@echarts.apache.org