Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust EC gauges in kibana with the new implementation #171903

Closed
Tracked by #174147
stratoula opened this issue Nov 24, 2023 · 1 comment · Fixed by #177766
Closed
Tracked by #174147

Adjust EC gauges in kibana with the new implementation #171903

stratoula opened this issue Nov 24, 2023 · 1 comment · Fixed by #177766
Assignees
Labels
enhancement New value added to drive a business result epic Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@stratoula
Copy link
Contributor

stratoula commented Nov 24, 2023

Refactor existing GaugeComponent expression to use the new Bullet spec.

<Goal
id="goal"
subtype={getSubtypeByGaugeType(gaugeType)}
base={bands[0]}
target={goal && goal >= bands[0] && goal <= bands[bands.length - 1] ? goal : undefined}
actual={actualValue}
tickValueFormatter={({ value: tickValue }) => tickFormatter.convert(tickValue)}
tooltipValueFormatter={(tooltipValue) => tickFormatter.convert(tooltipValue)}
bands={bands}
ticks={ticks}
domain={{ min, max }}
bandFillColor={
colorMode === GaugeColorModes.PALETTE
? (val) => {
const value = getPreviousSectionValue(val.value, bands);
const overridedColor = overrideColor(
value,
args.percentageMode ? bands : args.palette?.params?.stops ?? [],
args.percentageMode ? tickFormatter : undefined
);
if (overridedColor) {
return overridedColor;
}
return args.palette
? getColor(value, args.palette, bands, args.percentageMode) ?? TRANSPARENT
: TRANSPARENT;
}
: () => TRANSPARENT
}
labelMajor={labelMajorTitle ? `${labelMajorTitle}${majorExtraSpaces}` : labelMajorTitle}
labelMinor={labelMinor ? `${labelMinor}${minorExtraSpaces}` : ''}
{...extraTitles}
{...goalConfig}
{...getOverridesFor(overrides, 'gauge')}
/>

@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 24, 2023
@stratoula stratoula added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed needs-team Issues missing a team label labels Nov 24, 2023
@stratoula
Copy link
Contributor Author

cc @nickofthyme in case you want to fill in anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result epic Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Long-term goals
Development

Successfully merging a pull request may close this issue.

3 participants