Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <[email protected]>
  • Loading branch information
lezzago committed Jul 12, 2023
1 parent e7b7678 commit 9b8a692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/vis_type_vega/public/expressions/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ export const createSpecFromXYChartDatatable = (
const xAxisId = getXAxisId(dimensions, datatable.columns);
const xAxisTitle = cleanString(dimensions.x.label);
datatable.columns.forEach((column, index) => {
// Ignore columns that are for the x axis and events (eg. Alerts/Anomalies)
// Ignore columns that are for the x-axis and visLayers
if (isXAxisColumn(column) || isVisLayerColumn(column)) return;
// Get the series param id which is the 2nd value in the column id
// Example: 'col-1-3', the seriesParamId is 3. 'col-1-2-6', the seriesParamId is 2.
const seriesParamsId = column.id.split('-')[2];
const currentSeriesParams = visParams.seriesParams.find(
(param: { data: { id: string } }) => param.data.id === seriesParamsId
(param: { data: { id: string } }) => param?.data?.id === seriesParamsId
);
if (!currentSeriesParams) {
// eslint-disable-next-line no-console
Expand Down

0 comments on commit 9b8a692

Please sign in to comment.