UNPKG

@jspreadsheet/charts

Version:

JSS Charts is a premium JSS extension that allows you to create interactive and dynamic charts based on the data available in your online spreadsheets. This plugin seamlessly integrates JSS with the ChartJS engine, directly delivering visually stunning an

96 lines (76 loc) 2.12 kB
export interface IFont { color?: string, // the font family is not yet being used // family: string, size?: number, italic?: boolean, bold?: boolean } export type IDashStyle = 'solid' | 'dotted' | 'dashed' | 'dashed-dotted'; export interface ILine { color?: string, width?: number, dash?: IDashStyle, } export type IAlign = 'start' | 'center' | 'end'; export type IPosition = 'top' | 'left' | 'bottom' | 'right'; export interface ISpacingBetweenTicks { type: 'count' | 'value', value: number, } export interface IAxisTitle { text: string, align?: IAlign, font?: IFont } export interface IAxisGrid extends ILine { display?: boolean, } export interface IAxisTicks extends ILine { display?: boolean, length?: number, } export interface IAxisLabels extends IFont { display?: boolean, } export interface IBorder { color?: string, width?: number, } export interface IGenericAxis { title?: IAxisTitle, reverse?: boolean, border?: IBorder, ticks?: IAxisTicks, labels?: IAxisLabels, grid?: IAxisGrid } export interface IPercentLinearAxis extends IGenericAxis { spacingBetweenTicks?: ISpacingBetweenTicks, } export interface ILinearAxis extends IGenericAxis { min?: number, max?: number, forceTheLimits?: boolean, spacingBetweenTicks?: ISpacingBetweenTicks, // It would also be possible to define the formatting of the axis items // format: object, } export interface IRadialAxis { reverse?: boolean, spacingBetweenTicks?: ISpacingBetweenTicks, ticks?: IAxisLabels, pointLabels?: IAxisLabels, grid?: IAxisGrid, angleLines?: IAxisGrid, min?: number, max?: number, forceTheLimits?: boolean, } export interface ITitle { text: string, align?: IAlign, font?: IFont, position?: IPosition } export type IPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | 'rect' | 'rectRounded' | 'rectRot' | 'star' | 'triangle' | false;