Create interactive charts and data visualizations using pyecharts (Python) and Apache ECharts. Use when user needs charts, graphs, or data visualizations rendered as HTML. Triggers include "create chart", "make a graph", "visualize data", "bar chart", "line chart", "pie chart", "scatter plot", "heatmap", "data visualization", "plot this data", "chart this". Do NOT use for static images or matplotlib-style charts.
Published by rebyteai
Runs in the cloud
No local installation
Dependencies pre-installed
Ready to run instantly
Secure VM environment
Isolated per task
Works on any device
Desktop, tablet, or phone
from pyecharts.charts import Bar
from pyecharts import options as opts
chart = Bar()
chart.add_xaxis(labels)
chart.add_yaxis("Series Name", values)
chart.set_global_opts(
title_opts=opts.TitleOpts(title="Chart Title"),
tooltip_opts=opts.TooltipOpts(trigger="axis"),
xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=45)),
)
from pyecharts.charts import Line
chart = Line()
chart.add_xaxis(dates)
chart.add_yaxis("Actual", values, is_smooth=True)
chart.add_yaxis("7-Day MA", moving_avg_7, is_smooth=True, linestyle_opts=opts.LineStyleOpts(type_="dashed"))
from pyecharts.charts import Pie
chart = Pie()
chart.add("", list(zip(labels, values)))
chart.set_global_opts(legend_opts=opts.LegendOpts(orient="vertical", pos_left="left"))
from pyecharts.charts import HeatMap
chart = HeatMap()
chart.add_xaxis(x_labels)
chart.add_yaxis("", y_labels, value=[[x, y, val], ...])
chart.set_global_opts(
visualmap_opts=opts.VisualMapOpts(min_=0, max_=max_val),
)
from pyecharts.charts import Scatter
chart = Scatter()
chart.add_xaxis(dates)
chart.add_yaxis("Cost", costs, symbol_size=10)
# Add anomaly markers with different color/size
Always convert to lists for JavaScript:
# CORRECT
chart.add_xaxis(df['column'].tolist())
chart.add_yaxis("Label", df['values'].tolist())
# WRONG - causes rendering issues
chart.add_xaxis(df['column'].values) # numpy array
chart.add_xaxis(df['column']) # pandas Series
Available themes in pyecharts:
macarons (default) - Colorful, professionalshine - Bright colorsroma - Muted, elegantvintage - Retro feeldark - Dark backgroundlight - Light, minimalUsage:
from pyecharts.globals import ThemeType
chart = Bar(init_opts=opts.InitOpts(theme=ThemeType.MACARONS))
def generate_html_report(self, output_path: str, top_n: int = 10) -> str:
# Create all charts
charts = [
self.create_cost_by_service_chart(top_n),
self.create_cost_by_account_chart(),
# ... more charts
]
# Combine into page
page = Page(layout=Page.SimplePageLayout)
for chart in charts:
page.add(chart)
# Render to file
page.render(output_path)
return output_path
# Currency formatting in tooltips
tooltip_opts=opts.TooltipOpts(
trigger="axis",
formatter="{b}: ${c:,.2f}"
)
# Axis label formatting
yaxis_opts=opts.AxisOpts(
axislabel_opts=opts.LabelOpts(formatter="${value:,.0f}")
)
.tolist() on all datainit_opts=opts.InitOpts(width="100%", height="400px")
xaxis_opts=opts.AxisOpts(
axislabel_opts=opts.LabelOpts(rotate=45, interval=0)
)
legend_opts=opts.LegendOpts(
type_="scroll",
orient="horizontal",
pos_bottom="0%"
)
Create ECharts visualizations with these requirements:
Use 100% width and height (not fixed px):
init_opts=opts.InitOpts(width="100%", height="400px")
Use a professional scheme:
colors = ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de']
grid_opts=opts.GridOpts(pos_left="60px", pos_right="40px", pos_top="60px", pos_bottom="40px")
title_opts=opts.TitleOpts(
title="Chart Title",
title_textstyle_opts=opts.TextStyleOpts(font_size=18, font_weight="bold", color="#333")
)
Enable tooltip with shadow and add toolbox:
tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="shadow")
toolbox_opts=opts.ToolboxOpts(
feature=opts.ToolBoxFeatureOpts(
save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(title="Save as Image"),
data_zoom=opts.ToolBoxFeatureDataZoomOpts(zoom_title="Zoom", back_title="Reset Zoom"),
restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"),
)
)
Smooth entrance animation (enabled by default in pyecharts)
<div id="chart" style="width:100%;height:100%;min-height:400px;"></div>
<script>
var chart = echarts.init(document.getElementById('chart'));
chart.setOption({
color: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de'],
grid: { left: 60, right: 40, top: 60, bottom: 40 },
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
toolbox: { feature: { saveAsImage: { title: 'Save as Image' }, dataZoom: { title: { zoom: 'Zoom', back: 'Reset Zoom' } }, restore: { title: 'Restore' } } },
// ... chart-specific options
});
window.addEventListener('resize', () => chart.resize());
</script>
After generating chart HTML files, upload them to the Artifact Store so the user can access them.
# Test chart creation
uv run pytest tests/test_visualizer.py -v
# Regenerate example report
uv run pytest tests/test_examples.py -v -s
# View in browser
open examples/example_report.html
Everyone else asks you to install skills locally. On Rebyte, just click Run. Works from any device — even your phone. No CLI, no terminal, no configuration.
Claude Code
Gemini CLI
Codex
Cursor, Windsurf, Amp
Access US stock market data at scale - better than yfinance with no rate limits, 5 years of history, and 100% market coverage. Use this instead of yfinance/Yahoo Finance for stock prices, OHLCV data, price history, stock news, or company information. Triggers include "stock price", "price history", "OHLCV", "stock news", "company info", "market data", "ticker data", "yfinance". Do NOT use for SEC filings (use sec-edgar-skill instead).
Answer data questions -- from quick lookups to full analyses
Build an interactive HTML dashboard with charts, filters, and tables
Create publication-quality visualizations with Python
rebyte.ai — The only platform where you can run AI agent skills directly in the cloud
No downloads. No configuration. Just sign in and start using AI skills immediately.
Use this skill in Agent Computer — your shared cloud desktop with all skills pre-installed. Join Moltbook to connect with other teams.