@byteluck-fe/model-driven-controls 7.0.0-props.106 → 7.0.0-props.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -93,6 +93,43 @@ var BarChartPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
93
93
|
}
|
|
94
94
|
return BarChartPropertyRules;
|
|
95
95
|
}(PropertyRules);
|
|
96
|
+
var defaultBasicBarOption = {
|
|
97
|
+
grid: {
|
|
98
|
+
left: '3%',
|
|
99
|
+
right: '4%',
|
|
100
|
+
bottom: '3%',
|
|
101
|
+
containLabel: true
|
|
102
|
+
},
|
|
103
|
+
xAxis: {
|
|
104
|
+
type: 'category',
|
|
105
|
+
data: [
|
|
106
|
+
'Mon',
|
|
107
|
+
'Tue',
|
|
108
|
+
'Wed',
|
|
109
|
+
'Thu',
|
|
110
|
+
'Fri',
|
|
111
|
+
'Sat',
|
|
112
|
+
'Sun'
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
yAxis: {
|
|
116
|
+
type: 'value'
|
|
117
|
+
},
|
|
118
|
+
series: [
|
|
119
|
+
{
|
|
120
|
+
type: 'bar',
|
|
121
|
+
data: [
|
|
122
|
+
120,
|
|
123
|
+
200,
|
|
124
|
+
150,
|
|
125
|
+
80,
|
|
126
|
+
70,
|
|
127
|
+
110,
|
|
128
|
+
130
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
};
|
|
96
133
|
var BarChartProperty = /*#__PURE__*/ function(Property) {
|
|
97
134
|
"use strict";
|
|
98
135
|
_inherits(BarChartProperty, Property);
|
|
@@ -115,7 +152,7 @@ var BarChartProperty = /*#__PURE__*/ function(Property) {
|
|
|
115
152
|
_this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
|
|
116
153
|
_this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
|
|
117
154
|
_this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : 'bar-basic';
|
|
118
|
-
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 :
|
|
155
|
+
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : JSON.stringify(defaultBasicBarOption, null, 2);
|
|
119
156
|
_this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
|
|
120
157
|
_this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
|
|
121
158
|
_this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
|
|
@@ -101,6 +101,43 @@ var LineChartPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
101
101
|
}
|
|
102
102
|
return LineChartPropertyRules;
|
|
103
103
|
}(PropertyRules);
|
|
104
|
+
var defaultLineChartOption = {
|
|
105
|
+
grid: {
|
|
106
|
+
left: '3%',
|
|
107
|
+
right: '4%',
|
|
108
|
+
bottom: '3%',
|
|
109
|
+
containLabel: true
|
|
110
|
+
},
|
|
111
|
+
xAxis: {
|
|
112
|
+
type: 'category',
|
|
113
|
+
data: [
|
|
114
|
+
'Mon',
|
|
115
|
+
'Tue',
|
|
116
|
+
'Wed',
|
|
117
|
+
'Thu',
|
|
118
|
+
'Fri',
|
|
119
|
+
'Sat',
|
|
120
|
+
'Sun'
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
yAxis: {
|
|
124
|
+
type: 'value'
|
|
125
|
+
},
|
|
126
|
+
series: [
|
|
127
|
+
{
|
|
128
|
+
type: 'line',
|
|
129
|
+
data: [
|
|
130
|
+
120,
|
|
131
|
+
200,
|
|
132
|
+
150,
|
|
133
|
+
80,
|
|
134
|
+
70,
|
|
135
|
+
110,
|
|
136
|
+
130
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
104
141
|
var LineChartProperty = /*#__PURE__*/ function(Property) {
|
|
105
142
|
"use strict";
|
|
106
143
|
_inherits(LineChartProperty, Property);
|
|
@@ -123,7 +160,7 @@ var LineChartProperty = /*#__PURE__*/ function(Property) {
|
|
|
123
160
|
_this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
|
|
124
161
|
_this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
|
|
125
162
|
_this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : "line-basic";
|
|
126
|
-
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 :
|
|
163
|
+
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : JSON.stringify(defaultLineChartOption, null, 2);
|
|
127
164
|
_this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
|
|
128
165
|
_this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
|
|
129
166
|
_this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
|
|
@@ -78,6 +78,54 @@ import { MultistageFillingItem, Property, PropertyRules, DataSourceBind } from '
|
|
|
78
78
|
import { FONT_WEIGHT } from '../../framework';
|
|
79
79
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
80
80
|
import { createChartSeriesConfigRule } from '../utils';
|
|
81
|
+
var defaultPieOption = {
|
|
82
|
+
"tooltip": {
|
|
83
|
+
"trigger": "item"
|
|
84
|
+
},
|
|
85
|
+
"legend": {
|
|
86
|
+
"top": "bottom"
|
|
87
|
+
},
|
|
88
|
+
"series": [
|
|
89
|
+
{
|
|
90
|
+
"type": "pie",
|
|
91
|
+
"radius": [
|
|
92
|
+
"40%",
|
|
93
|
+
"70%"
|
|
94
|
+
],
|
|
95
|
+
"itemStyle": {
|
|
96
|
+
"borderRadius": 10
|
|
97
|
+
},
|
|
98
|
+
"data": [
|
|
99
|
+
{
|
|
100
|
+
"value": 1048,
|
|
101
|
+
"name": "搜索引擎"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"value": 735,
|
|
105
|
+
"name": "直接访问"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"value": 580,
|
|
109
|
+
"name": "邮件营销"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"value": 484,
|
|
113
|
+
"name": "联盟广告"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": 300,
|
|
117
|
+
"name": "视频广告"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"grid": {
|
|
123
|
+
"left": "3%",
|
|
124
|
+
"right": "4%",
|
|
125
|
+
"bottom": "3%",
|
|
126
|
+
"containLabel": true
|
|
127
|
+
}
|
|
128
|
+
};
|
|
81
129
|
var PieChartPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
82
130
|
"use strict";
|
|
83
131
|
_inherits(PieChartPropertyRules, PropertyRules);
|
|
@@ -113,7 +161,7 @@ var PieChartProperty = /*#__PURE__*/ function(Property) {
|
|
|
113
161
|
_this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
|
|
114
162
|
_this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
|
|
115
163
|
_this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : 'pie-rounded-ring';
|
|
116
|
-
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 :
|
|
164
|
+
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : JSON.stringify(defaultPieOption, null, 2);
|
|
117
165
|
_this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
|
|
118
166
|
_this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
|
|
119
167
|
_this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
|