Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/arc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,7 @@ ChartInternal.prototype.redrawArc = function(
.style('opacity', function(d) {
return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? 1 : 0
})
main
.select('.' + CLASS.chartArcsTitle)
.style('opacity', $$.hasType('donut') || hasGaugeType ? 1 : 0)


if (hasGaugeType) {
let index = 0
const backgroundArc = $$.arcs
Expand Down
5 changes: 5 additions & 0 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,11 @@ ChartInternal.prototype.redraw = function(options, transitions) {
.transition()
.style('opacity', targetsToShow.length ? 0 : 1)

// Only show arc title if chart type is donut or gauge and if there are any data to show
main
.select('.' + CLASS.chartArcsTitle)
.style('opacity', ($$.hasType('donut') || $$.hasType('gauge')) && targetsToShow.length > 0 ? 1 : 0)

// event rect
if (withEventRect) {
$$.redrawEventRect()
Expand Down