sea-chart 0.0.98 → 0.0.99

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.
@@ -155,7 +155,7 @@
155
155
  .statistic-color-rule-filters .delete-filter .dtable-icon-fork-number {
156
156
  display: inline-block;
157
157
  font-size: 12px;
158
- color: #949494;
158
+ color: #999999;
159
159
  }
160
160
 
161
161
  .statistic-color-rule-filters .popover-add-tool {
@@ -173,7 +173,7 @@
173
173
  }
174
174
 
175
175
  .statistic-color-rule-filters .filter-item .dtable-icon-fork-number:hover {
176
- color: #5a5a5a;
176
+ color: #555555;
177
177
  }
178
178
 
179
179
  .statistic-color-rule-filters .filter-container-readonly .selected-option-show,
@@ -137,7 +137,7 @@
137
137
  .statistic-delete-color-rule:hover .dtable-font,
138
138
  .statistic-btn-add-color-rule-filter:hover .popover-add-icon,
139
139
  .statistic-btn-add-color-rule-filter:hover .add-new-option {
140
- color: #5a5a5a;
140
+ color: #555555;
141
141
  }
142
142
 
143
143
  .statistic-btn-add-color-rule-filter.disabled:hover .popover-add-icon,
@@ -68,5 +68,5 @@
68
68
  }
69
69
 
70
70
  .sea-chart-settings .sea-chart-y-axis-title .dtable-icon-fork-number:hover {
71
- color: #212529;
71
+ color: #555555;
72
72
  }
@@ -77,7 +77,8 @@ const Wrapper = _ref => {
77
77
  summaryColumnsWithMethod,
78
78
  globalTheme,
79
79
  chartColorTheme,
80
- toggleRecords: toggleStatisticRecordsDialog
80
+ toggleRecords: toggleStatisticRecordsDialog,
81
+ isCalculateByView
81
82
  };
82
83
  switch (type) {
83
84
  case CHART_TYPE.TABLE:
@@ -74,6 +74,22 @@ function createChart(container) {
74
74
  return new Chart(config);
75
75
  }
76
76
  function initChart(currentChart, props) {
77
+ const {
78
+ result,
79
+ toggleRecords,
80
+ isCalculateByView
81
+ } = props;
82
+ if (isCalculateByView) {
83
+ currentChart.on('element:click', e => {
84
+ const lang = intl.lang;
85
+ const data = e.data.data;
86
+ const countryName = lang === 'zh-cn' ? data.name_cn : data.name;
87
+ const clickData = result.find(i => i.name === countryName);
88
+ if (clickData) {
89
+ toggleRecords(clickData);
90
+ }
91
+ });
92
+ }
77
93
  currentChart.tooltip({
78
94
  showTitle: false,
79
95
  showMarkers: false,
@@ -111,10 +127,18 @@ function getThemeColors() {
111
127
  return themeColors || CHART_THEME_COLOR[THEME_NAME_MAP.LIGHT];
112
128
  }
113
129
  function WorldMap(props) {
114
- const {
130
+ let {
115
131
  result: statisticData,
116
- chart
132
+ chart,
133
+ isCalculateByView
117
134
  } = props;
135
+ if (isCalculateByView) {
136
+ statisticData = statisticData.map(v => {
137
+ var _v$name;
138
+ v.name = ((_v$name = v.name) === null || _v$name === void 0 ? void 0 : _v$name.country_region) || v.name || '';
139
+ return v;
140
+ });
141
+ }
118
142
 
119
143
  // mapLocation is initially set to null, in this case mapLevel is country, so doesn't here
120
144
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.98",
3
+ "version": "0.0.99",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",