Home / Companies / Grafana Labs / Blog / Post Details
Content Deep Dive

Learn Grafana: How to build a scatter plot plugin in Grafana 7.0

Blog post from Grafana Labs

Post Details
Company
Date Published
Author
Marcus Olsson
Word Count
1,441
Language
English
Hacker News Points
-
Summary

Grafana 7.0 introduces a new React-based plugin platform that simplifies and accelerates the development of custom plugins, such as a scatter plot visualization. This tutorial guides users through creating a Grafana panel plugin using ReactJS and TypeScript, with a focus on visualizing scatter plots—graphs that map two variables as points on horizontal and vertical axes. The tutorial employs SVG for creating vector graphics and D3.js for transforming data, illustrating how to use these tools to generate scales and axes for the scatter plot. It highlights the importance of rendering data-driven SVG elements using React components and D3 for data transformations while managing the interplay between React and D3 for dynamic DOM updates. The tutorial also covers configuring Grafana to recognize the plugin, using Docker for development, and handling graphical transformations to position axes correctly. The article concludes by suggesting further enhancements, such as using actual data sources and adding user configurability to the plugin.