pubmed_generate_chart
Transform structured data from PubMed into customizable charts. Specify chart type, axes, and dimensions to generate a Base64-encoded PNG image for analysis and visualization.
Instructions
Generates a customizable chart (PNG) from structured data. Supports various plot types and requires data values and field mappings for axes. Returns a Base64-encoded PNG image.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
chartType | Yes | Specifies the type of chart to generate. | |
dataValues | Yes | An array of data objects to plot the chart (e.g., [{ 'year': '2020', 'articles': 150 }]). | |
height | No | The height of the chart canvas in pixels. | |
outputFormat | No | Specifies the output format for the chart. | png |
seriesField | No | The field name for creating multiple data series on the same chart. | |
sizeField | No | For bubble charts, the field name for encoding bubble size. | |
title | No | The main title displayed above the chart. | |
width | No | The width of the chart canvas in pixels. | |
xField | Yes | The field name from `dataValues` for the X-axis. | |
yField | Yes | The field name from `dataValues` for the Y-axis. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"chartType": {
"description": "Specifies the type of chart to generate.",
"enum": [
"bar",
"line",
"scatter",
"pie",
"doughnut",
"bubble",
"radar",
"polarArea"
],
"type": "string"
},
"dataValues": {
"description": "An array of data objects to plot the chart (e.g., [{ 'year': '2020', 'articles': 150 }]).",
"items": {
"additionalProperties": {},
"type": "object"
},
"minItems": 1,
"type": "array"
},
"height": {
"default": 600,
"description": "The height of the chart canvas in pixels.",
"exclusiveMinimum": 0,
"type": "integer"
},
"outputFormat": {
"default": "png",
"description": "Specifies the output format for the chart.",
"enum": [
"png"
],
"type": "string"
},
"seriesField": {
"description": "The field name for creating multiple data series on the same chart.",
"type": "string"
},
"sizeField": {
"description": "For bubble charts, the field name for encoding bubble size.",
"type": "string"
},
"title": {
"description": "The main title displayed above the chart.",
"type": "string"
},
"width": {
"default": 800,
"description": "The width of the chart canvas in pixels.",
"exclusiveMinimum": 0,
"type": "integer"
},
"xField": {
"description": "The field name from `dataValues` for the X-axis.",
"type": "string"
},
"yField": {
"description": "The field name from `dataValues` for the Y-axis.",
"type": "string"
}
},
"required": [
"chartType",
"dataValues",
"xField",
"yField"
],
"type": "object"
}