UNPKG

@thi.ng/viz

Version:

Declarative, functional & multi-format data visualization toolkit based around @thi.ng/hiccup

19 lines (18 loc) 403 B
import { float } from "@thi.ng/strings/float"; const axisDefaults = (extra) => ({ attribs: { stroke: "#000" }, label: (pos, body) => ["text", {}, pos, body], labelAttribs: { fill: "#000", stroke: "none" }, labelOffset: [0, 0], format: float(2), visible: true, major: { ticks: () => [], size: 10 }, minor: { ticks: () => [], size: 5 }, ...extra }); export { axisDefaults };