Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
Chart → Doughnut Chart
AI-generatedOverview
This node provides a utility to generate doughnut charts based on user-supplied data points and labels. It is useful for visualizing proportional data distributions in a circular chart with segments representing different categories. Common scenarios include displaying sales distribution by product category, budget allocation, or survey results.
The node accepts arrays of numerical data and corresponding labels, along with customization options such as colors, border width, chart dimensions, and title. It can output the generated chart either as an image binary or as a URL pointing to the chart image.
Properties
| Name | Meaning |
|---|---|
| Data Points | An array of numbers representing the values for each segment of the doughnut chart. |
| Labels | An array of strings labeling each segment corresponding to the data points. |
| Chart Title | A string specifying the title displayed on the chart. |
| Background Color | The background color of the chart image, specified as a hex color code (e.g., #ffffff). |
| Segment Colors | An array of hex color codes defining the fill colors for each segment in the doughnut chart. |
| Border Colors | An array of hex color codes defining the border colors for each segment. |
| Border Width | A number indicating the width (in pixels) of the borders around each segment. |
| Return as URL | Boolean flag to determine if the output should be a URL to the chart image instead of binary. |
| File Name | Optional string to specify the filename for the generated chart image (e.g., chart.png). |
| Width | Width of the chart image in pixels. |
| Height | Height of the chart image in pixels. |
Output
The node outputs JSON data containing the generated doughnut chart. Depending on the "Return as URL" property:
- If false, the output includes the chart image as binary data suitable for further processing or saving.
- If true, the output contains a URL string pointing to the hosted chart image.
The exact JSON structure typically includes fields like:
{
"json": {
"chartUrl": "https://...",
"fileName": "doughnut-chart.png"
},
"binary": {
"data": {
"data": "<base64-encoded-image-data>",
"mimeType": "image/png"
}
}
}
(if returning binary)
or
{
"json": {
"url": "https://..."
}
}
(if returning URL)
Dependencies
- Requires an API key credential for authentication with the external chart generation service at
https://prod.0codekit.com. - The node sends a POST request to
/generate/chart/doughnutendpoint with the chart parameters. - No additional environment variables are needed beyond the API key credential configuration.
Troubleshooting
- Invalid Data or Labels: Ensure that the "Data Points" and "Labels" arrays have the same length and contain valid entries. Mismatched lengths or invalid JSON will cause errors.
- Authentication Errors: Verify that the API key credential is correctly configured and has necessary permissions.
- Color Format Issues: Colors must be valid hex codes; incorrect formats may result in rendering errors or default colors.
- Image Size Limits: Extremely large width or height values might cause failures or slow responses.
- Network Issues: Since the node relies on an external API, network connectivity problems can cause timeouts or failures.
Common error messages usually indicate invalid input parameters or authentication failures. Reviewing the input properties and credential setup typically resolves these issues.
Links and References
- Doughnut Chart Concept - Chart.js Documentation
- 0CodeKit API Documentation (if publicly available) (Note: link is illustrative)