|
@@ -1,141 +0,0 @@
|
|
|
-
|
|
|
- * @description: 桑基图
|
|
|
- * @Date: 2024-0625
|
|
|
- * @Author: liu.shiyi
|
|
|
- */
|
|
|
-
|
|
|
-
|
|
|
-const version = '2023111501'
|
|
|
-
|
|
|
-const category = 'Sankey'
|
|
|
-
|
|
|
-const title = '基础桑基图'
|
|
|
-
|
|
|
-const chartType = 'Sankey'
|
|
|
-
|
|
|
-const name = 'JICHUSANGJITU'
|
|
|
-
|
|
|
-
|
|
|
-const setting = [
|
|
|
- {
|
|
|
- label: '起始节点',
|
|
|
- type: 'select',
|
|
|
- field: 'sourceField',
|
|
|
- optionField: 'sourceField',
|
|
|
-
|
|
|
- multiple: false,
|
|
|
- value: '',
|
|
|
- tabName: 'data'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '目标节点',
|
|
|
- type: 'select',
|
|
|
- field: 'targetField',
|
|
|
- optionField: 'targetField',
|
|
|
-
|
|
|
- multiple: false,
|
|
|
- value: '',
|
|
|
- tabName: 'data'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '权重',
|
|
|
- type: 'select',
|
|
|
- field: 'weightField',
|
|
|
- optionField: 'weightField',
|
|
|
-
|
|
|
- multiple: false,
|
|
|
- value: '',
|
|
|
- tabName: 'data'
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- {
|
|
|
- label: '背景颜色',
|
|
|
-
|
|
|
- type: 'colorSelect',
|
|
|
-
|
|
|
- field: 'color',
|
|
|
-
|
|
|
- optionField: 'color',
|
|
|
- value: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'],
|
|
|
- tabName: 'custom',
|
|
|
- groupName: 'graph'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '节点背景颜色',
|
|
|
- type: 'colorPicker',
|
|
|
- field: 'nodeStyle_fill',
|
|
|
- optionField: 'nodeStyle.fill',
|
|
|
- value: '#E5E6EB10',
|
|
|
- tabName: 'custom',
|
|
|
- groupName: 'graph'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '节点边框颜色',
|
|
|
- type: 'colorPicker',
|
|
|
- field: 'nodeStyle_stroke',
|
|
|
- optionField: 'nodeStyle.stroke',
|
|
|
- value: '#E5E6EB10',
|
|
|
- tabName: 'custom',
|
|
|
- groupName: 'graph'
|
|
|
- }
|
|
|
-
|
|
|
-]
|
|
|
-
|
|
|
-
|
|
|
-const data = [
|
|
|
- { source: '首次打开', target: '首页 UV', value: 160 },
|
|
|
- { source: '结果页', target: '首页 UV', value: 40 },
|
|
|
- { source: '验证页', target: '首页 UV', value: 10 },
|
|
|
- { source: '我的', target: '首页 UV', value: 10 },
|
|
|
- { source: '朋友', target: '首页 UV', value: 8 },
|
|
|
- { source: '其他来源', target: '首页 UV', value: 27 },
|
|
|
- { source: '首页 UV', target: '理财', value: 30 },
|
|
|
- { source: '首页 UV', target: '扫一扫', value: 40 },
|
|
|
- { source: '首页 UV', target: '服务', value: 35 },
|
|
|
- { source: '首页 UV', target: '蚂蚁森林', value: 25 },
|
|
|
- { source: '首页 UV', target: '跳失', value: 10 },
|
|
|
- { source: '首页 UV', target: '借呗', value: 30 },
|
|
|
- { source: '首页 UV', target: '花呗', value: 40 },
|
|
|
- { source: '首页 UV', target: '其他流向', value: 45 }
|
|
|
-]
|
|
|
-
|
|
|
-const optionHandler = ''
|
|
|
-
|
|
|
-
|
|
|
-const dataHandler = ''
|
|
|
-
|
|
|
-
|
|
|
-const option = {
|
|
|
-
|
|
|
- dataKey: 'data',
|
|
|
-
|
|
|
- appendPadding: [0, 0, 0, 0],
|
|
|
- data,
|
|
|
- sourceField: 'source',
|
|
|
- targetField: 'target',
|
|
|
- weightField: 'value',
|
|
|
- nodeWidthRatio: 0.008,
|
|
|
- nodePaddingRatio: 0.03,
|
|
|
- color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'],
|
|
|
- nodeStyle: {
|
|
|
- fill: '#72CC4A',
|
|
|
- stroke: '#72CC4A'
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
-export default {
|
|
|
- category,
|
|
|
- version,
|
|
|
- title,
|
|
|
- chartType,
|
|
|
- name,
|
|
|
- option,
|
|
|
- setting,
|
|
|
- dataHandler,
|
|
|
- optionHandler
|
|
|
-}
|