/** * QuickChart Node - Version 1 * Create a chart via QuickChart */ export interface QuickChartV1Params { /** * The type of chart to create * @default bar */ chartType?: 'bar' | 'doughnut' | 'line' | 'pie' | 'polarArea' | Expression; labelsMode?: 'manually' | 'array' | Expression; /** * Labels to use in the chart * @displayOptions.show { labelsMode: ["manually"] } * @default {} */ labelsUi?: { /** Labels */ labelsValues?: Array<{ /** Label */ label?: string | Expression | PlaceholderValue; }>; }; /** * The array of labels to be used in the chart * @displayOptions.show { labelsMode: ["array"] } */ labelsArray?: string | Expression | PlaceholderValue; /** * Data to use for the dataset, documentation and examples <a href="https://quickchart.io/documentation/chart-types/" target="_blank">here</a> */ data?: IDataObject | string | Expression; /** * The binary data will be displayed in the Output panel on the right, under the Binary tab * @hint The name of the output field to put the binary file data in * @default data */ output?: string | Expression | PlaceholderValue; chartOptions?: { /** Background color of the chart */ backgroundColor?: string | Expression; /** Pixel ratio of the chart * @default 2 */ devicePixelRatio?: number | Expression; /** File format of the resulting chart * @default png */ format?: 'png' | 'pdf' | 'svg' | 'webp' | Expression; /** Height of the chart * @default 300 */ height?: number | Expression; /** Whether the chart should use its Y axis horizontal * @displayOptions.show { /chartType: ["bar", "boxplot", "violin"] } * @default false */ horizontal?: boolean | Expression; /** Width of the chart * @default 500 */ width?: number | Expression; }; datasetOptions?: { /** Color used for the background the dataset (area of a line graph, fill of a bar chart, etc.) */ backgroundColor?: string | Expression; /** Color used for lines of the dataset */ borderColor?: string | Expression; /** Whether to fill area of the dataset * @displayOptions.show { /chartType: ["line"] } * @default true */ fill?: boolean | Expression; /** The label of the dataset */ label?: string | Expression | PlaceholderValue; /** Style to use for points of the dataset * @displayOptions.show { /chartType: ["line"] } * @default circle */ pointStyle?: 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | 'rect' | 'rectRot' | 'rectRounded' | 'star' | 'triangle' | Expression; }; } interface QuickChartV1NodeBase { type: 'n8n-nodes-base.quickChart'; version: 1; } export type QuickChartV1ParamsNode = QuickChartV1NodeBase & { config: NodeConfig; }; export type QuickChartV1Node = QuickChartV1ParamsNode;