Skip to content
Snippets Groups Projects
Unverified Commit 91d12f37 authored by Alexander Lesnenko's avatar Alexander Lesnenko Committed by GitHub
Browse files

Fix missing formatting on the x axis of the row chart (#17974)

parent 361d8816
Branches
Tags
No related merge requests found
......@@ -119,6 +119,13 @@ export default function rowRenderer(
.group(group)
.ordering(d => d.index);
chart.xAxis().tickFormat(value => {
return formatValue(value, {
...settings.column(cols[1]),
type: "axis",
});
});
const labelPadHorizontal = 5;
let labelsOutside = false;
......
import { restore, visitQuestionAdhoc } from "__support__/e2e/cypress";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
const { PRODUCTS, PRODUCTS_ID } = SAMPLE_DATASET;
const testQuery = {
type: "query",
query: {
"source-table": PRODUCTS_ID,
aggregation: [["count"]],
breakout: [["field", PRODUCTS.PRICE, { binning: { strategy: "default" } }]],
},
database: 1,
};
describe("visual tests > visualizations > row", () => {
beforeEach(() => {
restore();
cy.signInAsNormalUser();
cy.server();
cy.route("POST", "/api/dataset").as("dataset");
});
it("with formatted x-axis", () => {
visitQuestionAdhoc({
dataset_query: testQuery,
display: "row",
displayIsLocked: true,
visualization_settings: {
column_settings: {
'["name","count"]': { suffix: " items", number_style: "decimal" },
},
},
});
cy.wait("@dataset");
cy.percySnapshot();
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment