Skip to content

Commit

Permalink
feat: 优化 polar plot 传参
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoboding committed Jan 7, 2020
1 parent 34b6436 commit 582e5bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/data/polar.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ export default {
polarType: 'bar',
stack: {},
radial: true
},
xprops: {
legendVisible: false
}
},
{
Expand Down
10 changes: 7 additions & 3 deletions src/packages/polar/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,17 @@ class PolarChart extends BaseChart {
}

polar (data, settings, extra) {
const { isEmptyData } = extra
const {
legendVisible,
tooltipVisible,
isEmptyData
} = extra

if (isEmptyData) return {}

const tooltip = PolarChart.getTooltip(settings)
const tooltip = tooltipVisible && PolarChart.getTooltip(settings)

const legend = PolarChart.getLegend(data)
const legend = legendVisible && PolarChart.getLegend(data)

const polar = PolarChart.getPolar(settings)

Expand Down

0 comments on commit 582e5bb

Please sign in to comment.