Skip to content

Commit

Permalink
Merge pull request #1573 from FlowFuse/bar-tooltip-0
Browse files Browse the repository at this point in the history
Only show tooltip value if > 0 in a stacked bar chart
  • Loading branch information
Steve-Mcl authored Jan 10, 2025
2 parents 237b40c + f317921 commit a39d576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/widgets/ui-chart/UIChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default {
return true
},
filter: (tooltipItem, tooltipIndex) => {
if (this.props.chartType === 'histogram') {
if (this.props.chartType === 'histogram' || (this.props.chartType === 'bar' && this.props.stackSeries)) {
// don't show tooltips for empty data points
return tooltipItem.parsed.y !== undefined && tooltipItem.parsed.y > 0
} else if (this.props.chartType === 'line') {
Expand Down

0 comments on commit a39d576

Please sign in to comment.