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

fix(Mixed Timeseries Chart): Custom Metric Label #17649

Merged
merged 5 commits into from
Dec 14, 2021
Merged
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,16 @@ import { TIMESERIES_CONSTANTS } from '../constants';
export default function transformProps(
chartProps: EchartsMixedTimeseriesFormData,
): EchartsMixedTimeseriesChartTransformedProps {
const { width, height, formData, queriesData, hooks, filterState } =
chartProps;
const {
width,
height,
formData,
queriesData,
hooks,
filterState,
datasource,
} = chartProps;
const { verboseMap = {} } = datasource;
const { annotation_data: annotationData_ } = queriesData[0];
const annotationData = annotationData_ || {};
const data1: TimeseriesDataRecord[] = queriesData[0].data || [];
Expand Down Expand Up @@ -121,10 +129,12 @@ export default function transformProps(
}: EchartsMixedTimeseriesFormData = { ...DEFAULT_FORM_DATA, ...formData };

const colorScale = CategoricalColorNamespace.getScale(colorScheme as string);
const rawSeriesA = extractTimeseriesSeries(rebaseTimeseriesDatum(data1), {
const rebasedDataA = rebaseTimeseriesDatum(data1, verboseMap);
const rawSeriesA = extractTimeseriesSeries(rebasedDataA, {
fillNeighborValue: stack ? 0 : undefined,
});
const rawSeriesB = extractTimeseriesSeries(rebaseTimeseriesDatum(data2), {
const rebasedDataB = rebaseTimeseriesDatum(data2, verboseMap);
const rawSeriesB = extractTimeseriesSeries(rebasedDataB, {
fillNeighborValue: stackB ? 0 : undefined,
});

Expand Down