Chart Fundamentals
All Evidence charts follow a similar pattern:- Detect data types (dates, numbers, categories)
- Format axes and labels
- Provide interactive tooltips
- Enable download as image or CSV
Line Charts
Perfect for time series and trends.Line Chart Options
step=true- Create step chartsyLog=true- Use logarithmic scalelabels=true- Show value labelscolorPalette={['#cf0d06', '#eb5752']}- Custom colors
Bar Charts
Ideal for comparing categories.Bar Chart Options
swapXY=true- Create horizontal barstype=grouped- Group bars instead of stackinglabels=true- Show value labelsstackTotalLabel=false- Hide total labels on stacked barssort=true- Automatically sort by value
Area Charts
Show cumulative values and trends.Area Chart Types
Stacked Area (default):Advanced Features
Reference Lines
Add target lines or thresholds:Filtering Data
Use JavaScript to filter query results:Custom Formatting
Control how values display:usd- $1,234.56usd0- $1,235usd0k- $12kpct- 45.2%num- 1,234.56#,##0.00- Custom number format
Custom Height
Adjust chart size:ECharts Customization
Evidence uses Apache ECharts under the hood. You can pass custom options:Real-World Examples
Sales Dashboard
Additional Chart Types
Evidence supports many more chart types:- ScatterPlot - Correlations and distributions
- BubbleChart - Three-dimensional comparisons
- Histogram - Frequency distributions
- BoxPlot - Statistical distributions
- Heatmap - Matrix visualizations
- Sankey - Flow diagrams
- Funnel - Conversion funnels
Data Tables
Display raw data with rich formatting:Enhanced Tables
colorscale- Color-coded valuesbar- Inline bar visualizationlink- Clickable linkssparkline- Inline sparkline charts
Best Practices
Choose the Right Chart
- Time series → Line or Area chart
- Comparisons → Bar chart
- Composition → Stacked bar or Area chart
- Distribution → Histogram or Box plot
- Correlation → Scatter plot
Simplify Visuals
- Limit series - Too many lines/bars create clutter
- Filter data - Show top 10, not all 100 categories
- Use color purposefully - Highlight key insights
- Add context - Use reference lines for targets
Format for Readability
- Appropriate precision - Use
usd0instead ofusdfor large numbers - Consistent scales - Compare apples to apples
- Clear labels - Set
xAxisTitleandyAxisTitle - Readable dates - Format with
xFmt='mmm yyyy'
Next Steps
- Build templated pages - Create dynamic drill-down pages
- Customize styling - Match your brand
- Add interactivity - Use dropdowns and filters