Scatter Chart in Google Charts
Scatter Chart
A scatter plot is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for a set of data. In other words, it is a chart that shows the relationship between two variables. Scatter charts plot points on a graph. When the user hovers over the points, tooltips are displayed with more information.
Use Scatter Charts:-
- It is used for identifying anomalies
- To Check how one variable affects another
- To Check a correlation, pattern, trend, or relationship
Steps for adding Google Scatter Charts to your Website:-
- To use Google Scatter Chart on your website, add a link to the charts loader.
- After this, add a div with a unique id. Then, we have to load Google Graph API.
- Load the Visualization API with the desired package name. In our case, it is "corechart".
- Set a callback function.
- The visualization API is:- google.charts.load('current', {'packages':['corechart']})
- The callback function will be:- google.charts.setOnLoadCallback(draw_my_chart)
Code Explanation
All Tutorials related to Charts Tutorials
Annotation Chart
Area Charts
Bar Chart
Bubble Chart
Calendar Chart
Candlestick Chart
Column Chart
Combo Chart
Donut Chart
Gauge Chart
Geo Chart
Histogram Chart
Line Chart
Org Chart
Pie Chart
Scatter Chart
Stepped Area Chart
Timelines Chart