@frontify/fondue-charts
Version:
Frontify's data viz library
48 lines (47 loc) • 1.09 kB
JavaScript
import { lightTheme as e } from "@visx/xychart";
import { TICK_LABEL_WEIGHT as c, BODY_FONT_FAMILY as l } from "./consts.es.js";
const s = 6, r = 4, a = {
fontSize: "var(--typography-font-size-x-small)",
fontFamily: `var(${l})`,
fontWeight: c,
fill: "var(--fc-font-color-weak)"
}, t = (o) => ({
axisLabel: {},
axisLine: {
stroke: o === "x" ? "var(--fc-axis-x-stroke-color)" : "var(--fc-axis-y-stroke-color)"
},
tickLine: {
stroke: "var(--fc-tick-stroke-color)"
},
tickLabel: {
...a,
textAnchor: o === "x" ? "middle" : "end",
verticalAnchor: o === "x" ? "end" : "middle",
dx: o === "x" ? 0 : -r,
dy: o === "x" ? r : 0
},
tickLength: s
}), i = (o) => ({
...e,
backgroundColor: "var(--fc-base-color)",
colors: o,
gridStyles: {
stroke: "var(--fc-grid-stroke-color)"
},
axisStyles: {
x: {
bottom: t("x"),
top: t("x")
},
y: {
left: t("y"),
right: t("y")
}
}
});
export {
a as TICK_LABEL_STYLE,
i as createTheme,
t as getAxisStyles
};
//# sourceMappingURL=createTheme.es.js.map