diff --git a/libs/plotly/plotly-layout.model.ts b/libs/plotly/plotly-layout.model.ts index f853c2ac2928050a6bddbde9a0f684747cb27993..392e2eee046be72826d5183b0e825e012b853c80 100644 --- a/libs/plotly/plotly-layout.model.ts +++ b/libs/plotly/plotly-layout.model.ts @@ -1,11 +1,46 @@ -import {Layout} from 'plotly.js'; - -import {PlotlyLegend} from './plotly-legend.model'; +import { + Color, + Datum, + DTickValue, + Layout, + LayoutAxis, + TypedArray, +} from 'plotly.js'; export interface PlotlyLayout extends Partial<Layout> { + /** x-axis */ + xaxis: Partial<PlotlyAxis>; + /** y-axis */ + yaxis: Partial<PlotlyAxis>; + /** Aspect ratio of plot */ aspectRatio?: string; +} + +/** + * Plotly axis + */ +export interface PlotlyAxis extends Partial<LayoutAxis> { + minor: Partial<PlotlyMinor>; +} - /** Plotly legend */ - legend?: Partial<PlotlyLegend>; +/** + * Plotly minor axis type. + * + * https://plotly.com/javascript/reference/layout/xaxis/#layout-xaxis-minor + */ +export interface PlotlyMinor { + dtick: DTickValue; + gridcolor: Color; + griddash: string; + gridwidth: number; + nticks: number; + showgrid: boolean; + tick0: number | string; + tickcolor: Color; + ticklen: number; + tickmode: 'auto' | 'linear' | 'array'; + ticks: 'outside' | 'inside' | ''; + tickvals: Datum[] | Datum[][] | Datum[][][] | TypedArray; + tickwidth: number; }