Skip to content

Commit

Permalink
be
Browse files Browse the repository at this point in the history
  • Loading branch information
getrebuild committed Mar 16, 2024
1 parent 64036db commit 25f0a5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/resources/web/assets/css/charts.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ See LICENSE and COMMERCIAL in the project root for license information.
.chart.ctable .table.line-number thead th:first-child,
.chart.ctable .table.line-number tbody th:first-child {
width: 50px;
color: #888;
}

.chart.ctable .table.sums tbody tr:last-child td {
Expand Down
12 changes: 9 additions & 3 deletions src/main/resources/web/assets/js/charts/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1340,9 +1340,11 @@ class ChartCNMap extends BaseChart {
const data4map = []
data.data.forEach((item) => {
let lnglat = item[1].split(',')
data4map.push([lnglat[0], lnglat[1], item[2], item[0]])
data4map.push([lnglat[0], lnglat[1], item[2] || null, item[0]])
})

const hasNumAxis = data.name ? true : false

// https://github.com/apache/echarts/tree/master/extension-src/bmap
const option = {
...cloneOption(ECHART_BASE),
Expand All @@ -1359,17 +1361,21 @@ class ChartCNMap extends BaseChart {
},
series: [
{
type: 'scatter',
type: hasNumAxis ? 'effectScatter' : 'scatter',
coordinateSystem: 'bmap',
symbol: data.name ? 'circle' : 'pin',
symbolSize: function (v) {
console.log(v)
return data.name ? 14 : 18
return hasNumAxis ? 14 : 18
},
data: data4map,
encode: {
value: 2,
},
showEffectOn: 'emphasis',
rippleEffect: {
brushType: 'stroke',
},
},
],
}
Expand Down

0 comments on commit 25f0a5e

Please sign in to comment.