Skip to content

Commit

Permalink
fix: variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Jul 16, 2024
1 parent 68afb25 commit ca0c0b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Graph/processor/graphProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ export const processGraphData = ({
};

if (ooui.type === "line" && ooui.y_range) {
result.yAxisProps = {
result.yAxisOpts = {

Check failure on line 187 in src/Graph/processor/graphProcessor.ts

View workflow job for this annotation

GitHub Actions / build

Property 'yAxisOpts' does not exist on type '{ data: GraphValues[]; isGroup: boolean; isStack: boolean; }'.
mode: ooui.y_range,
};
if (ooui.y_range === "auto") {
const { min, max } = getMinMax(finalData);
result.yAxisProps.min = min;
result.yAxisProps.max = max;
result.yAxisOpts.min = min;

Check failure on line 192 in src/Graph/processor/graphProcessor.ts

View workflow job for this annotation

GitHub Actions / build

Property 'yAxisOpts' does not exist on type '{ data: GraphValues[]; isGroup: boolean; isStack: boolean; }'.
result.yAxisOpts.max = max;

Check failure on line 193 in src/Graph/processor/graphProcessor.ts

View workflow job for this annotation

GitHub Actions / build

Property 'yAxisOpts' does not exist on type '{ data: GraphValues[]; isGroup: boolean; isStack: boolean; }'.
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/spec/graphProcessor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ describe("in processGraphData method", () => {

describe("when processing a line chart with y_range", () => {
describe("if y_range is auto", () => {
it("should return yAxisProps with mode auto, min and max values", () => {
it("should return yAxisOpts with mode auto, min and max values", () => {
const xml = `<?xml version="1.0"?>
<graph type="line" y_range="auto" timerange="day">
<field name="date" axis="x"/>
Expand All @@ -216,9 +216,9 @@ describe("in processGraphData method", () => {
];
const fields = { date: { type: "date" }, v: { type: "integer" } };
const result = processGraphData({ ooui: parsedGraph, values, fields });
expect(result.yAxisProps.mode).toBe("auto");
expect(result.yAxisProps.min).toBe(8);
expect(result.yAxisProps.max).toBe(32);
expect(result.yAxisOpts.mode).toBe("auto");
expect(result.yAxisOpts.min).toBe(8);
expect(result.yAxisOpts.max).toBe(32);
});
});
});
Expand Down

0 comments on commit ca0c0b6

Please sign in to comment.