Skip to content

Commit

Permalink
[FE-18092] All others gray, not hashed (#681)
Browse files Browse the repository at this point in the history
* If defaulting all others, use the default all others color
* Built files
  • Loading branch information
johallar authored Nov 20, 2024
1 parent 1e94f12 commit ab44a52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/charting.js
Original file line number Diff line number Diff line change
Expand Up @@ -88334,7 +88334,11 @@ function pieChart(parent, chartGroup) {
} else if (domain.length > 0 && range.length === 0) {
// if we have a domain but no range, palette was changed
var _newRange = pieData.map(function (d, i) {
return _chart.getColor(d.data, i);
if ([__WEBPACK_IMPORTED_MODULE_9__utils_color_helpers__["b" /* ALL_OTHERS_LABEL */]].includes(d.data.key0)) {
return __WEBPACK_IMPORTED_MODULE_9__utils_color_helpers__["a" /* ALL_OTHERS_COLOR */];
} else {
return _chart.getColor(d.data, i);
}
});
_chart.customRange(_newRange);
} else if (domain.length > 0) {
Expand Down
8 changes: 7 additions & 1 deletion src/charts/pie-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,13 @@ export default function pieChart(parent, chartGroup) {
_chart.customRange(newRange)
} else if (domain.length > 0 && range.length === 0) {
// if we have a domain but no range, palette was changed
const newRange = pieData.map((d, i) => _chart.getColor(d.data, i))
const newRange = pieData.map((d, i) => {
if ([ALL_OTHERS_LABEL].includes(d.data.key0)) {
return ALL_OTHERS_COLOR
} else {
return _chart.getColor(d.data, i)
}
})
_chart.customRange(newRange)
} else if (domain.length > 0) {
maybeUpdateDomainRange(
Expand Down

0 comments on commit ab44a52

Please sign in to comment.