mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
feat: Adding the option and feature to enable borders with color, opacity and width control on heatmaps along with white borders on emphasis (#32358)
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,9 @@ import {
|
||||
getSequentialSchemeRegistry,
|
||||
getTimeFormatter,
|
||||
getValueFormatter,
|
||||
rgbToHex,
|
||||
addAlpha,
|
||||
supersetTheme,
|
||||
tooltipHtml,
|
||||
} from '@superset-ui/core';
|
||||
import memoizeOne from 'memoize-one';
|
||||
@@ -86,6 +89,8 @@ export default function transformProps(
|
||||
metric = '',
|
||||
normalizeAcross,
|
||||
normalized,
|
||||
borderColor,
|
||||
borderWidth = 0,
|
||||
showLegend,
|
||||
showPercentage,
|
||||
showValues,
|
||||
@@ -161,6 +166,20 @@ export default function transformProps(
|
||||
return valueFormatter(paramsValue?.[2] as number | null | undefined);
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
borderColor: addAlpha(
|
||||
rgbToHex(borderColor.r, borderColor.g, borderColor.b),
|
||||
borderColor.a,
|
||||
),
|
||||
borderWidth,
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderColor: supersetTheme.colors.grayscale.light5,
|
||||
shadowBlur: 10,
|
||||
shadowColor: supersetTheme.colors.grayscale.dark2,
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user