Visualizations are a key component of effective notebooks, helping transform raw query results into clear, compelling charts that support your data narrative. Notebooks support all the same visualization options available in the New Relic query builder.
Available chart types
Choose the right visualization for your data and story:
Line charts
Perfect for showing trends over time and comparing multiple metrics.
Best for: Time series data, performance trends, comparing metrics over time
Example query:
SELECT average(duration) AS 'Response Time'FROM TransactionWHERE appName = 'MyApp'TIMESERIES 5 minutesSINCE 6 hours agoArea charts
Show volume and composition changes over time with filled areas under the line.
Best for: Cumulative data, showing total volume with breakdowns, resource usage over time
Example query:
SELECT count(*) FROM TransactionWHERE appName = 'MyApp'FACET hostTIMESERIES 10 minutesSINCE 2 hours agoBar charts
Compare values across different categories or dimensions.
Best for: Comparing values across categories, top N lists, error breakdowns
Example query:
SELECT count(*) AS 'Request Count'FROM TransactionWHERE appName = 'MyApp'FACET nameSINCE 1 hour agoORDER BY count(*) DESCLIMIT 10Pie charts
Display proportional data and percentage breakdowns.
Best for: Showing parts of a whole, percentage distributions, simple category breakdowns
Example query:
SELECT count(*) FROM TransactionWHERE appName = 'MyApp'FACET httpResponseCodeSINCE 1 hour agoTables
Present detailed data in rows and columns for precise values.
Best for: Detailed data, exact values, lists with multiple attributes, debugging
Example query:
SELECT timestamp, name, duration, httpResponseCodeFROM TransactionWHERE appName = 'MyApp' AND duration > 5SINCE 1 hour agoORDER BY duration DESCLIMIT 20Billboards
Highlight single important metrics prominently.
Best for: Key performance indicators, summary statistics, single important values
Example query:
SELECT average(duration) AS 'Avg Response Time (ms)'FROM TransactionWHERE appName = 'MyApp'SINCE 1 hour agoCustomize your visualizations
Chart settings
Access chart customization options by clicking the Chart settings icon in your query block:
- Colors: Choose custom colors for your data series
- Axes: Customize axis labels, ranges, and formatting
- Legend: Show/hide legend, adjust positioning
- Thresholds: Add horizontal lines for targets or alerts
- Units: Format numbers, percentages, time values
Color schemes
Choose colors that support your narrative:
- Default palette: Standard New Relic colors for consistency
- Custom colors: Match your organization's branding
- Accessible colors: High contrast for better readability
- Status colors: Green for healthy, red for errors, yellow for warnings
Formatting options
Format your data for clarity:
- Numbers: Add thousands separators, decimal places
- Percentages: Show as percentages rather than decimals
- Time values: Display in hours, minutes, or seconds
- Bytes: Show in KB, MB, GB as appropriate
Visualization best practices
Choose the right chart type
Tip
The chart type should support your story, not distract from it. When in doubt, simpler is usually better.
- Time series data: Use line or area charts
- Comparisons: Use bar charts
- Proportions: Use pie charts (but limit to 5-7 categories)
- Exact values: Use tables
- Key metrics: Use billboards
Design for clarity
Chart titles and labels
Always add descriptive titles and labels:
SELECT average(duration) AS 'Average Response Time (ms)', percentile(duration, 95) AS '95th Percentile (ms)'FROM TransactionWHERE appName = 'E-commerce API'SINCE 24 hours agoTIMESERIES 1 hourUse consistent formatting
- Keep similar charts using the same time ranges
- Use consistent color schemes across related charts
- Apply the same formatting rules throughout your notebook
Highlight important information
- Use thresholds to show targets or SLA boundaries
- Choose colors that draw attention to problems (red for errors)
- Size billboards appropriately for their importance
Context and storytelling
Add explanatory text
Use Markdown blocks to provide context for your visualizations:
## Response Time Analysis
The chart below shows a significant spike in response times at 2:30 PM,corresponding with the deployment of version 2.1.4. The 95th percentilereached 2.8 seconds, well above our 500ms SLA target.
### What this means:- 5% of users experienced unacceptable delays- The issue was resolved by rolling back the deployment- We need better performance testing before releasesTell a story with multiple charts
Arrange your visualizations to build a narrative:
- Overview chart: Start with high-level metrics
- Drill-down charts: Show specific aspects or segments
- Root cause charts: Display underlying causes
- Resolution charts: Show improvement or fixes
Advanced visualization techniques
Using variables for dynamic charts
Create reusable visualizations with variables:
{{appName = "production-api"}}{{timeRange = "6 hours ago"}}SELECT count(*) AS 'Requests', average(duration) AS 'Avg Duration'FROM TransactionWHERE appName = '{{appName}}'TIMESERIES 5 minutesSINCE {{timeRange}}Comparative analysis
Show before and after or period comparisons:
SELECT average(duration) AS 'Response Time'FROM TransactionWHERE appName = 'MyApp'TIMESERIES 1 hourSINCE 7 days agoCOMPARE WITH 1 week agoMulti-faceted analysis
Break down metrics by multiple dimensions:
SELECT count(*) FROM TransactionWHERE appName = 'MyApp'FACET host, httpResponseCodeSINCE 2 hours agoTroubleshooting visualizations
Common issues
Chart shows no data:
- Check your time range includes data
- Verify your WHERE clauses are correct
- Ensure you have permission to access the data
Chart is too cluttered:
- Use LIMIT to reduce the number of series
- Consider breaking into multiple charts
- Use aggregation to combine less important categories
Data looks wrong:
- Check for timezone issues in time series
- Verify your math in calculated fields
- Look for filtering that might exclude expected data
Performance optimization
- Use appropriate time ranges for your analysis
- Add specific WHERE clauses to limit data volume
- Use sampling for very large datasets
- Consider using approximation functions for better performance
What's next?
- Learn about sharing notebooks with your team
- Explore notebook examples for visualization inspiration
- Check out the chart types guide for detailed information about all available visualizations