Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ function VisualizationWidgetContent({
timeSeries,
widget,
labelParts.filter(defined).join(SERIES_NAME_PART_DELIMITER),
seriesName
seriesName,
timeSeries.meta.isOther ? theme.tokens.dataviz.semantic.neutral : undefined
);
if (!plottable) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ export function createPlottableFromTimeSeries(
timeSeries: TimeSeries,
widget: Widget,
alias?: string,
name?: string
name?: string,
color?: string
): Plottable | null {
const shouldStack = widget.queries[0]?.columns.length! > 0;

const {displayType, title} = widget;
switch (displayType) {
case DisplayType.LINE:
return new Line(timeSeries, {alias, name});
return new Line(timeSeries, {alias, name, color});
case DisplayType.AREA:
return new Area(timeSeries, {alias, name});
return new Area(timeSeries, {alias, name, color});
case DisplayType.BAR:
return new Bars(timeSeries, {stack: shouldStack ? title : undefined, alias, name});
return new Bars(timeSeries, {
stack: shouldStack ? title : undefined,
alias,
name,
color,
});
default:
return null;
}
Expand Down
Loading