Skip to main content
Module

x/fresh_charts/deps.ts>ChartJs.CartesianScaleOptions

A server-side-rendered charting library for Fresh
Go to Latest
interface ChartJs.CartesianScaleOptions
implements CoreScaleOptions
import { type ChartJs } from "https://deno.land/x/fresh_charts@0.2.0/deps.ts";
const { CartesianScaleOptions } = ChartJs;

Properties

bounds: "ticks" | "data"

Scale boundary strategy (bypassed by min/max time options)

  • data: make sure data are fully visible, ticks outside are removed
  • ticks: make sure ticks are fully visible, data outside are truncated
position:
| "left"
| "top"
| "right"
| "bottom"
| "center"
| { [scale: string]: number; }

Position of the axis.

optional
stack: string

Stack group. Axes at the same position with same stack are stacked.

optional
stackWeight: number

Weight of the scale in stack group. Used to determine the amount of allocated space for the scale within the group.

axis: "x" | "y" | "r"

Which type of axis this is. Possible values are: 'x', 'y', 'r'. If not set, this is inferred from the first character of the ID which should be 'x', 'y' or 'r'.

min: number

User defined minimum value for the scale, overrides minimum value from data.

max: number

User defined maximum value for the scale, overrides maximum value from data.

offset: boolean

If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to true for a bar chart by default.

grid: Partial<GridLineOptions>
title: { display: boolean; align: Align; text: string | string[]; color: Color; font: ScriptableAndScriptableOptions<Partial<FontSpec>, ScriptableCartesianScaleContext>; padding: number | { top: number; bottom: number; y: number; }; }

Options for the scale title.

optional
stacked: boolean | "single"

If true, data will be comprised between datasets of data