{ "name": "ml-pie-image", "version": "3.0.12", "scripts": { "build-dev": "cube build ./ --output=../../datavComponent --remote=pandav --smart" }, "dependencies": { "bcore": "0.0.22", "d3": "3.5.12", "dchart-pie-multi-radius": "0.5.8", "dchart-core": "2.6.31", "jquery": "2.1.4", "lodash": "4.17.11" }, "pandav": { "cn_name": "带图饼图", "level": 0, "protocol": 3, "type": [ "DataV-6:regular_pie" ], "apis": { "source": { "handler": "render", "description": "带图饼图接口", "fields": { "x": { "description": "类目" }, "y": { "description": "值" } } } }, "config": { "options": { "type": "menu", "children": { "chart": { "name": "图表", "children": { "pie": { "name": "饼图样式", "type": "group", "children": { "image": { "name": "中心图片", "type": "image", "default": "https://img.alicdn.com/tfs/TB1YLu3eeL2gK0jSZPhXXahvXXa-200-200.png" }, "imagePreserveAspect": { "name": "保持宽高比", "type": "switch", "default": true }, "imageScale": { "name": "缩放比例", "type": "slider", "min": 0, "max": 1, "step": 0.01, "default": 0.7, "suffix": "%", "showInPanel": { "conditions": [ [ ".imagePreserveAspect", "$eq", true ] ] } }, "imageSize": { "name": "图片大小", "type": "suite", "children": { "width": { "name": "图片宽度", "type": "slider", "min": 0, "max": 1, "step": 0.01, "default": 1, "suffix": "%" }, "height": { "name": "图片高度", "type": "slider", "min": 0, "max": 1, "step": 0.01, "default": 1, "suffix": "%" } }, "showInPanel": { "conditions": [ [ ".imagePreserveAspect", "$eq", false ] ] } }, "imageOpacity": { "name": "图片透明度", "type": "slider", "default": 1, "min": 0, "max": 1 } } }, "numericalLabel": { "type": "group", "name": "数值标签", "children": { "textStyle": { "name": "文本", "type": "font", "default": { "fontFamily": "Microsoft Yahei", "fontWeight": "normal", "fontSize": 12, "color": "rgb(144, 160, 174)" } }, "real": { "type": "switch", "name": "真实数值", "default": false }, "decimal": { "name": "小数点位数", "type": "stepper", "default": 0, "min": 0, "max": 10, "step": 1, "showInPanel": { "conditions": [ [ ".real", "$eq", false ] ] } } }, "enableHide": true }, "categoryLabel": { "type": "group", "name": "类目标签", "children": { "show": { "default": false }, "textStyle": { "name": "文本", "type": "font", "default": { "fontFamily": "Microsoft Yahei", "fontWeight": "normal", "fontSize": 12, "color": "rgba(255,255,255,0.8)" } } }, "enableHide": true }, "labelLine": { "type": "group", "name": "标签引导线", "children": { "dx": { "name": "标签距中心", "type": "slider", "default": 0.7, "min": 0, "max": 1, "precision": 2, "step": 0.01 }, "dr": { "type": "slider", "name": "轴距距中心", "default": 1, "min": 0, "max": 1, "precision": 2, "step": 0.01 } }, "enableHide": true }, "legend": { "name": "图例", "type": "group", "handler": "updateLegendLayout", "children": { "show": { "default": false }, "textarea": { "type": "font", "name": "文本", "default": { "fontFamily": "Microsoft Yahei", "fontWeight": "normal", "fontSize": 10, "color": "rgba(255,255,255,0.5)" } }, "layout": { "name": "布局", "type": "group", "children": { "margin": { "name": "间距", "type": "suite", "children": { "horiInterval": { "name": "左右间距", "type": "stepper", "default": 8, "col": 12, "suffix": "px" }, "vertiInterval": { "name": "上下间距", "type": "stepper", "default": 0, "col": 12, "suffix": "px" } } }, "loc": { "name": "位置", "type": "iconRadio", "default": "bottom-center", "options": [ { "value": "top-left", "src": "top-left", "label": "顶部居左" }, { "value": "top-center", "src": "top-center", "label": "顶部居中" }, { "value": "top-right", "src": "top-right", "label": "顶部居右" }, { "value": "bottom-left", "src": "bottom-left", "label": "底部居左" }, { "value": "bottom-center", "src": "bottom-center", "label": "底部居中" }, { "value": "bottom-right", "src": "bottom-right", "label": "底部居右" } ] } } } }, "enableHide": true } } }, "axis": { "name": "坐标轴", "mode": "multiple", "children": { "radiusAxis": { "name": "径向轴", "children": { "radius": { "name": "半径", "type": "slider", "default": 1, "min": 0, "max": 1 }, "grid": { "type": "group", "name": "网格线", "enableHide": true, "children": { "show": { "default": false }, "color": { "type": "fill", "name": "颜色", "default": "rgba(170,170,170,0.5)" } } } } } } }, "series": { "type": "menuChild", "name": "系列", "children": { "series": { "type": "tabs", "name": "数据系列", "default": [ { "color": "rgb(121, 218, 255)", "radius": { "innerRadius": 0.8, "outerRadius": 1 } }, { "color": "rgb(10, 115, 255)", "radius": { "innerRadius": 0.8, "outerRadius": 0.95 } } ], "template": { "type": "object", "name": "系列<%= i+1 %>", "children": { "color": { "name": "颜色", "type": "fill", "default": "#2F8FBE" }, "radius": { "type": "suite", "name": "半径", "children": { "innerRadius": { "type": "stepper", "name": "内半径", "default": 0.65, "min": 0, "max": 1, "step": 0.01, "precision": 2, "col": 12 }, "outerRadius": { "type": "stepper", "name": "外半径", "default": 0.9, "min": 0, "max": 1, "step": 0.01, "precision": 2, "col": 12 } } } } } } } }, "others": { "name": "其它", "children": { "animation": { "name": "缓动动画", "type": "group", "children": { "show": { "default": true }, "setting": { "type": "suite", "name": "动画设置", "children": { "animationEasing": { "name": "缓动效果", "type": "select", "options": [ { "value": "linear", "label": "linear" }, { "value": "quadraticIn", "label": "quadraticIn" }, { "value": "quadraticOut", "label": "quadraticOut" }, { "value": "quadraticInOut", "label": "quadraticInOut" }, { "value": "cubicIn", "label": "cubicIn" }, { "value": "cubicOut", "label": "cubicOut" }, { "value": "cubicInOut", "label": "cubicInOut" }, { "value": "quarticIn", "label": "quarticIn" }, { "value": "quarticOut", "label": "quarticOut" }, { "value": "quarticInOut", "label": "quarticInOut" }, { "value": "quinticIn", "label": "quinticIn" }, { "value": "quinticOut", "label": "quinticOut" }, { "value": "quinticInOut", "label": "quinticInOut" }, { "value": "sinusoidalIn", "label": "sinusoidalIn" }, { "value": "sinusoidalOut", "label": "sinusoidalOut" }, { "value": "sinusoidalInOut", "label": "sinusoidalInOut" }, { "value": "exponentialIn", "label": "exponentialIn" }, { "value": "exponentialOut", "label": "exponentialOut" }, { "value": "exponentialInOut", "label": "exponentialInOut" }, { "value": "circularIn", "label": "circularIn" }, { "value": "circularOut", "label": "circularOut" }, { "value": "circularInOut", "label": "circularInOut" }, { "value": "elasticIn", "label": "elasticIn" }, { "value": "elasticOut", "label": "elasticOut" }, { "value": "elasticInOut", "label": "elasticInOut" }, { "value": "backIn", "label": "backIn" }, { "value": "backOut", "label": "backOut" }, { "value": "backInOut", "label": "backInOut" }, { "value": "bounceIn", "label": "bounceIn" }, { "value": "bounceOut", "label": "bounceOut" }, { "value": "bounceInOut", "label": "bounceInOut" } ], "default": "cubicInOut", "filterable": true, "allowCustom": true }, "animationAfterPreviousSeries": { "name": "各系列依次动画", "type": "switch", "default": false, "col": 12 }, "animationAllFromZero": { "name": "从零度开始", "type": "switch", "default": true, "col": 12 } } }, "enter": { "type": "suite", "name": "入场动画", "children": { "animationDuration": { "name": "初始动画时长", "type": "stepper", "step": 1, "default": 1000, "col": 12, "suffix": "ms" } } }, "update": { "type": "suite", "name": "更新动画", "children": { "animationDurationUpdate": { "name": "更新动画时长", "type": "stepper", "default": 300, "step": 1, "col": 12, "suffix": "ms" }, "animationUpdateFromPrevious": { "name": "是否从之前位置开始", "type": "switch", "default": true, "col": 12 } } } }, "enableHide": true }, "tooltip": { "name": "提示框", "type": "group", "children": { "show": { "default": true }, "hideDelay": { "name": "消失延迟时间", "type": "stepper", "default": 100, "step": 1, "suffix": "ms" }, "trigger": { "type": "suite", "name": "触发方式", "children": { "action": { "name": "触发动作", "type": "iconRadio", "options": [ { "value": "hover", "label": "悬浮", "src": "hover" }, { "value": "click", "label": "点击", "src": "click" } ], "default": "hover" } } }, "textStyle": { "name": "文本样式", "type": "font", "default": { "fontFamily": "Microsoft Yahei", "fontWeight": "normal", "fontSize": 14, "color": "#fff" } }, "bgBox": { "name": "背景框样式", "type": "group", "children": { "backgroundColor": { "name": "背景色", "type": "fill", "default": "rgba(0, 0, 0, 0.65)" }, "customSize": { "name": "自定义", "type": "suite", "children": { "show": { "default": false }, "width": { "name": "宽度", "type": "stepper", "default": 150, "step": 1, "col": 12, "suffix": "px" }, "height": { "name": "高度", "type": "stepper", "default": 50, "step": 1, "col": 12, "suffix": "px" } }, "enableHide": true }, "padding": { "name": "内边距", "type": "stepper", "default": 10, "step": 1, "suffix": "px" }, "offset": { "type": "suite", "name": "偏移量", "children": { "xOffset": { "name": "水平偏移量", "type": "stepper", "default": 6, "step": 1, "col": 12, "suffix": "px" }, "yOffset": { "name": "垂直偏移量", "type": "stepper", "default": 10, "step": 1, "col": 12, "suffix": "px" } } }, "border": { "type": "suite", "name": "边框", "children": { "borderWidth": { "name": "边框粗细", "type": "stepper", "step": 1, "default": 0, "col": 12, "suffix": "px" }, "borderColor": { "name": "边框颜色", "type": "fill", "default": "#333", "col": 12 } } } } } }, "enableHide": true } }, "type": "menuChild", "mode": "single" } } } }, "api_data": { "source": [ { "x": "货物1", "y": "2325" }, { "x": "货物2", "y": "6422" } ] }, "view": { "width": "300", "height": "180", "minWidth": "30", "minHeight": "20", "z-index": 1010 }, "publicHandler": { "highlight": { "name": "高亮", "fields": { "data": { "name": "数据", "description": "需要高亮的数据项,如{x: '货物1'}", "type": "object" }, "options": { "name": "配置", "type": "object", "optional": true, "children": { "style": { "name": "样式", "type": "object", "optional": true, "description": "高亮样式,如:fill、stroke、opacity等", "children": { "stroke": { "name": "描边色", "type": "string", "default": "#f00", "optional": true }, "fill": { "name": "填充色", "type": "string", "optional": true } } }, "selectMode": { "name": "元素选择器模式", "type": "string", "default": "single", "optional": true, "description": "all高亮选中的全部元素,single高亮选中的第一个元素" }, "cancelHighlightFirst": { "name": "是否先取消之前高亮", "type": "boolean", "default": false, "optional": true, "description": "在本次高亮前是否先取消之前的高亮元素" } } } }, "type": "object" }, "cancelHighlight": { "name": "取消高亮", "fields": { "data": { "name": "数据", "type": "object", "optional": true, "default": false, "description": "需要取消高亮的数据项,如{x: '货物1'},当data字段缺省时,取消全部高亮数据" }, "options": { "name": "配置", "type": "object", "optional": true, "children": { "mode": { "name": "模式", "type": "string", "default": "single", "optional": true, "description": "all取消高亮选中的全部元素,single取消高亮选中的第一个元素" } } } }, "type": "object" }, "clear": { "name": "清空组件", "type": "null" } }, "events": { "click": { "name": "当点击数据项时", "type": "object", "description": "当点击数据项时", "fields": { "x": { "type": "string | number", "name": "类目", "optional": true, "description": "类目" }, "y": { "type": "number", "name": "值", "optional": true, "description": "值" } } } }, "icon": "/civ_pandaview_component/pandabi-component/assets/TB1sKA0mKL2gK0jSZPhXXahvXXa-368-208.png", "thumbnail": "/civ_pandaview_component/pandabi-component/assets/TB1hDesmebviK0jSZFNXXaApXXa-160-116.png" } }