@teamflojo/floimg-quickchart 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Brett Cooke
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,239 @@
1
+ # imgflo-quickchart
2
+
3
+ QuickChart.io generator for imgflo - create charts using Chart.js configuration.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install imgflo imgflo-quickchart
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import createClient from 'imgflo';
15
+ import quickchart from 'imgflo-quickchart';
16
+
17
+ const imgflo = createClient({
18
+ store: {
19
+ default: 's3',
20
+ s3: { region: 'us-east-1', bucket: 'my-charts' }
21
+ }
22
+ });
23
+
24
+ // Register the QuickChart generator
25
+ imgflo.registerGenerator(quickchart());
26
+
27
+ // Generate a bar chart
28
+ const chart = await imgflo.generate({
29
+ generator: 'quickchart',
30
+ params: {
31
+ type: 'bar',
32
+ data: {
33
+ labels: ['Q1', 'Q2', 'Q3', 'Q4'],
34
+ datasets: [{
35
+ label: 'Revenue ($M)',
36
+ data: [12, 19, 3, 5],
37
+ backgroundColor: 'rgba(75, 192, 192, 0.6)'
38
+ }]
39
+ },
40
+ options: {
41
+ scales: {
42
+ y: {
43
+ beginAtZero: true
44
+ }
45
+ }
46
+ }
47
+ }
48
+ });
49
+
50
+ // Convert to PNG and save
51
+ const png = await imgflo.transform({ blob: chart, op: 'convert', to: 'image/png' });
52
+ const result = await imgflo.save(png, './output/revenue.png');
53
+
54
+ console.log(result.url); // Use in slides, emails, etc.
55
+ ```
56
+
57
+ ## Chart Types
58
+
59
+ QuickChart supports all Chart.js chart types:
60
+
61
+ ### Bar Chart
62
+
63
+ ```typescript
64
+ await imgflo.generate({
65
+ generator: 'quickchart',
66
+ params: {
67
+ type: 'bar',
68
+ data: {
69
+ labels: ['Red', 'Blue', 'Yellow'],
70
+ datasets: [{ data: [12, 19, 3] }]
71
+ }
72
+ }
73
+ });
74
+ ```
75
+
76
+ ### Line Chart
77
+
78
+ ```typescript
79
+ await imgflo.generate({
80
+ generator: 'quickchart',
81
+ params: {
82
+ type: 'line',
83
+ data: {
84
+ labels: ['Jan', 'Feb', 'Mar', 'Apr'],
85
+ datasets: [{
86
+ label: 'Sales',
87
+ data: [10, 15, 13, 17],
88
+ borderColor: 'rgb(75, 192, 192)',
89
+ tension: 0.1
90
+ }]
91
+ }
92
+ }
93
+ });
94
+ ```
95
+
96
+ ### Pie Chart
97
+
98
+ ```typescript
99
+ await imgflo.generate({
100
+ generator: 'quickchart',
101
+ params: {
102
+ type: 'pie',
103
+ data: {
104
+ labels: ['Desktop', 'Mobile', 'Tablet'],
105
+ datasets: [{
106
+ data: [45, 40, 15],
107
+ backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
108
+ }]
109
+ }
110
+ }
111
+ });
112
+ ```
113
+
114
+ ### Doughnut Chart
115
+
116
+ ```typescript
117
+ await imgflo.generate({
118
+ generator: 'quickchart',
119
+ params: {
120
+ type: 'doughnut',
121
+ data: {
122
+ labels: ['Win', 'Loss', 'Draw'],
123
+ datasets: [{ data: [10, 5, 3] }]
124
+ }
125
+ }
126
+ });
127
+ ```
128
+
129
+ ## Configuration
130
+
131
+ ### Generator Options
132
+
133
+ ```typescript
134
+ imgflo.registerGenerator(quickchart({
135
+ width: 800, // Default width
136
+ height: 600, // Default height
137
+ backgroundColor: 'white', // Default background
138
+ format: 'png', // 'png' | 'svg' | 'webp'
139
+ devicePixelRatio: 2.0 // For high DPI displays
140
+ }));
141
+ ```
142
+
143
+ ### Per-Chart Overrides
144
+
145
+ ```typescript
146
+ await imgflo.generate({
147
+ generator: 'quickchart',
148
+ params: {
149
+ width: 1200, // Override width
150
+ height: 800, // Override height
151
+ backgroundColor: '#f0f0f0',
152
+ type: 'bar',
153
+ data: { /* ... */ }
154
+ }
155
+ });
156
+ ```
157
+
158
+ ## Chart.js Documentation
159
+
160
+ Since this generator uses Chart.js format directly, refer to the official Chart.js docs:
161
+
162
+ - **Chart Types**: https://www.chartjs.org/docs/latest/charts/
163
+ - **Configuration**: https://www.chartjs.org/docs/latest/configuration/
164
+ - **Options**: https://www.chartjs.org/docs/latest/general/options.html
165
+ - **Examples**: https://www.chartjs.org/docs/latest/samples/
166
+
167
+ ## Advanced Examples
168
+
169
+ ### Multi-Dataset Chart
170
+
171
+ ```typescript
172
+ await imgflo.generate({
173
+ generator: 'quickchart',
174
+ params: {
175
+ type: 'line',
176
+ data: {
177
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
178
+ datasets: [
179
+ {
180
+ label: '2023',
181
+ data: [10, 15, 13, 17, 20],
182
+ borderColor: 'rgb(75, 192, 192)'
183
+ },
184
+ {
185
+ label: '2024',
186
+ data: [12, 17, 15, 19, 23],
187
+ borderColor: 'rgb(255, 99, 132)'
188
+ }
189
+ ]
190
+ },
191
+ options: {
192
+ plugins: {
193
+ title: {
194
+ display: true,
195
+ text: 'Sales Comparison'
196
+ }
197
+ }
198
+ }
199
+ }
200
+ });
201
+ ```
202
+
203
+ ### Stacked Bar Chart
204
+
205
+ ```typescript
206
+ await imgflo.generate({
207
+ generator: 'quickchart',
208
+ params: {
209
+ type: 'bar',
210
+ data: {
211
+ labels: ['Q1', 'Q2', 'Q3', 'Q4'],
212
+ datasets: [
213
+ { label: 'Product A', data: [10, 15, 12, 18], backgroundColor: '#FF6384' },
214
+ { label: 'Product B', data: [8, 12, 10, 14], backgroundColor: '#36A2EB' }
215
+ ]
216
+ },
217
+ options: {
218
+ scales: {
219
+ x: { stacked: true },
220
+ y: { stacked: true }
221
+ }
222
+ }
223
+ }
224
+ });
225
+ ```
226
+
227
+ ## No Dependencies
228
+
229
+ This package has zero runtime dependencies - it just makes HTTP requests to QuickChart.io's free API.
230
+
231
+ ## License
232
+
233
+ MIT
234
+
235
+ ## See Also
236
+
237
+ - [imgflo](https://github.com/bcooke/imgflo) - Core library
238
+ - [QuickChart.io](https://quickchart.io) - Chart rendering service
239
+ - [Chart.js](https://www.chartjs.org) - Charting library
@@ -0,0 +1,73 @@
1
+ import type { ImageGenerator, GeneratorSchema } from "@teamflojo/floimg";
2
+ /**
3
+ * Schema for the QuickChart generator
4
+ */
5
+ export declare const quickchartSchema: GeneratorSchema;
6
+ /**
7
+ * QuickChart generator - creates charts using Chart.js via QuickChart.io API
8
+ *
9
+ * This generator accepts Chart.js configuration directly (pass-through pattern).
10
+ * No imgflo abstraction - you get full Chart.js capabilities.
11
+ *
12
+ * @see https://www.chartjs.org/docs/ - Chart.js documentation
13
+ * @see https://quickchart.io/documentation/ - QuickChart API docs
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * import createClient from '@teamflojo/floimg';
18
+ * import quickchart from '@teamflojo/floimg-quickchart';
19
+ *
20
+ * const floimg = createClient();
21
+ * floimg.registerGenerator(quickchart());
22
+ *
23
+ * const chart = await floimg.generate({
24
+ * generator: 'quickchart',
25
+ * params: {
26
+ * type: 'bar',
27
+ * data: {
28
+ * labels: ['Q1', 'Q2', 'Q3', 'Q4'],
29
+ * datasets: [{
30
+ * label: 'Revenue',
31
+ * data: [12, 19, 3, 5]
32
+ * }]
33
+ * }
34
+ * }
35
+ * });
36
+ * ```
37
+ */
38
+ export interface QuickChartConfig {
39
+ /** QuickChart API endpoint (defaults to https://quickchart.io) */
40
+ apiUrl?: string;
41
+ /** Image width in pixels (default: 500) */
42
+ width?: number;
43
+ /** Image height in pixels (default: 300) */
44
+ height?: number;
45
+ /** Background color (default: transparent) */
46
+ backgroundColor?: string;
47
+ /** Device pixel ratio for high DPI (default: 1.0) */
48
+ devicePixelRatio?: number;
49
+ /** Output format: 'png' | 'svg' | 'webp' (default: 'png') */
50
+ format?: 'png' | 'svg' | 'webp';
51
+ }
52
+ export interface QuickChartParams extends Record<string, unknown> {
53
+ /** Chart.js chart type */
54
+ type?: string;
55
+ /** Chart.js data object */
56
+ data?: Record<string, unknown>;
57
+ /** Chart.js options object */
58
+ options?: Record<string, unknown>;
59
+ /** Override width for this chart */
60
+ width?: number;
61
+ /** Override height for this chart */
62
+ height?: number;
63
+ /** Override background color */
64
+ backgroundColor?: string;
65
+ /** Override format */
66
+ format?: 'png' | 'svg' | 'webp';
67
+ }
68
+ /**
69
+ * Create a QuickChart generator instance
70
+ */
71
+ export default function quickchart(config?: QuickChartConfig): ImageGenerator;
72
+ export { quickchart };
73
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAa,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,eAiE9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/D,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB;IACtB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,GAAE,gBAAqB,GAAG,cAAc,CAqEhF;AAGD,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,122 @@
1
+ /**
2
+ * Schema for the QuickChart generator
3
+ */
4
+ export const quickchartSchema = {
5
+ name: "quickchart",
6
+ description: "Generate charts using Chart.js via QuickChart.io API",
7
+ category: "Charts",
8
+ parameters: {
9
+ type: {
10
+ type: "string",
11
+ title: "Chart Type",
12
+ description: "Type of chart to generate",
13
+ enum: ["bar", "line", "pie", "doughnut", "radar", "polarArea", "scatter", "bubble"],
14
+ default: "bar",
15
+ },
16
+ data: {
17
+ type: "object",
18
+ title: "Chart Data",
19
+ description: "Chart.js data object with labels and datasets",
20
+ properties: {
21
+ labels: {
22
+ type: "array",
23
+ title: "Labels",
24
+ description: "Category labels for the chart",
25
+ },
26
+ datasets: {
27
+ type: "array",
28
+ title: "Datasets",
29
+ description: "Array of dataset objects",
30
+ },
31
+ },
32
+ },
33
+ options: {
34
+ type: "object",
35
+ title: "Chart Options",
36
+ description: "Chart.js options object for customization",
37
+ },
38
+ width: {
39
+ type: "number",
40
+ title: "Width",
41
+ description: "Image width in pixels",
42
+ default: 500,
43
+ minimum: 100,
44
+ maximum: 2000,
45
+ },
46
+ height: {
47
+ type: "number",
48
+ title: "Height",
49
+ description: "Image height in pixels",
50
+ default: 300,
51
+ minimum: 100,
52
+ maximum: 2000,
53
+ },
54
+ backgroundColor: {
55
+ type: "string",
56
+ title: "Background Color",
57
+ description: "Background color (hex, rgb, or 'transparent')",
58
+ default: "transparent",
59
+ },
60
+ format: {
61
+ type: "string",
62
+ title: "Output Format",
63
+ description: "Output image format",
64
+ enum: ["png", "svg", "webp"],
65
+ default: "png",
66
+ },
67
+ },
68
+ requiredParameters: ["type", "data"],
69
+ };
70
+ /**
71
+ * Create a QuickChart generator instance
72
+ */
73
+ export default function quickchart(config = {}) {
74
+ const { apiUrl = "https://quickchart.io", width: defaultWidth = 500, height: defaultHeight = 300, backgroundColor: defaultBgColor = "transparent", devicePixelRatio = 1.0, format: defaultFormat = "png", } = config;
75
+ return {
76
+ name: "quickchart",
77
+ schema: quickchartSchema,
78
+ async generate(params) {
79
+ const { width = defaultWidth, height = defaultHeight, backgroundColor = defaultBgColor, format = defaultFormat, ...chartConfig } = params;
80
+ // Build Chart.js config (pass-through)
81
+ const chart = {
82
+ type: chartConfig.type || "bar",
83
+ data: chartConfig.data || {},
84
+ options: chartConfig.options || {},
85
+ };
86
+ // Build QuickChart URL
87
+ const url = new URL(`${apiUrl}/chart`);
88
+ url.searchParams.set("c", JSON.stringify(chart));
89
+ url.searchParams.set("w", String(width));
90
+ url.searchParams.set("h", String(height));
91
+ url.searchParams.set("bkg", backgroundColor);
92
+ url.searchParams.set("devicePixelRatio", String(devicePixelRatio));
93
+ url.searchParams.set("f", format);
94
+ // Fetch chart image
95
+ const response = await fetch(url.toString());
96
+ if (!response.ok) {
97
+ throw new Error(`QuickChart API error: ${response.status} ${response.statusText}`);
98
+ }
99
+ const bytes = Buffer.from(await response.arrayBuffer());
100
+ // Determine MIME type
101
+ const mimeMap = {
102
+ png: "image/png",
103
+ svg: "image/svg+xml",
104
+ webp: "image/webp",
105
+ };
106
+ return {
107
+ bytes,
108
+ mime: mimeMap[format] || mimeMap.png,
109
+ width: width,
110
+ height: height,
111
+ source: "quickchart",
112
+ metadata: {
113
+ chartType: chart.type,
114
+ format,
115
+ },
116
+ };
117
+ },
118
+ };
119
+ }
120
+ // Also export as named export for convenience
121
+ export { quickchart };
122
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,sDAAsD;IACnE,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;YACnF,OAAO,EAAE,KAAK;SACf;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,+C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CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7C,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CACb,yBAAyB,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAClE,CAAC;YACJ,CAAC;YAED,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;YAExD,sBAAsB;YACtB,MAAM,OAAO,GAAG;gBACd,GAAG,EAAE,WAAoB;gBACzB,GAAG,EAAE,eAAwB;gBAC7B,IAAI,EAAE,YAAqB;aAC5B,CAAC;YAEF,OAAO;gBACL,KAAK;gBACL,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,GAAG;gBACpC,KAAK,EAAE,KAAe;gBACtB,MAAM,EAAE,MAAgB;gBACxB,MAAM,EAAE,YAAY;gBACpB,QAAQ,EAAE;oBACR,SAAS,EAAE,KAAK,CAAC,IAAI;oBACrB,MAAM;iBACP;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,8CAA8C;AAC9C,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@teamflojo/floimg-quickchart",
3
+ "version": "0.1.0",
4
+ "description": "QuickChart.io generator for floimg - create charts using Chart.js",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "keywords": [
20
+ "floimg",
21
+ "quickchart",
22
+ "chart",
23
+ "chartjs",
24
+ "graph",
25
+ "visualization",
26
+ "image-generation"
27
+ ],
28
+ "author": "Brett Cooke",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/TeamFlojo/floimg.git",
33
+ "directory": "packages/floimg-quickchart"
34
+ },
35
+ "peerDependencies": {
36
+ "@teamflojo/floimg": "^0.1.0"
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^22.10.2",
40
+ "typescript": "^5.7.2",
41
+ "vitest": "^2.1.9",
42
+ "@teamflojo/floimg": "0.1.0"
43
+ },
44
+ "engines": {
45
+ "node": ">=18.0.0"
46
+ },
47
+ "scripts": {
48
+ "build": "tsc",
49
+ "dev": "tsc --watch",
50
+ "typecheck": "tsc --noEmit",
51
+ "clean": "rm -rf dist"
52
+ }
53
+ }