We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

JavaScript Bubble charts are like scatter chart, but allows you to visualize data in 3 dimensions. The size of the bubble is determined based on the third parameter.


Customizing each point in bubble

Appearance of each data point in a bubble chart can be customized using point render event to differentiate each point based on the size.


Data label

Shows details about the data points with the help of data label support.


Code snippet

import { Chart, BubbleSeries, Category } from '@syncfusion/ej2-charts';
Chart.Inject(BubbleSeries, Category);

let chart: Chart = new Chart({
    primaryXAxis: {
        valueType: 'Category'
    },
    series:[{
        type: 'Bubble',
        dataSource: [
            { x: 1, y: 45, text: 'USA', fill: '#00226C', size: 1.347 },
            { x: 2, y: 20, text: 'AUS', fill: '#0450C2', size: 1 },
            { x: 3, y: 56, text: 'CHN', fill: '#0073DC', size: 0.01 },
            { x: 4, y: 30, text: 'IND', fill: '#0D98FF', size: 0.7 },
            { x: 5, y: 13, text: 'JPN', fill: '#9CD9FF', size: 0.333 },
            { x: 6, y: 45, text: 'UK', fill: '#0450C2', size: 1 }
        ],
        xName: 'x', yName: 'y'
    },
],
}, '#Chart');
<!DOCTYPE html>
<html>

<head></head>

<body style = 'overflow: hidden'>
    <div id="container">
     <div id="Chart"></div>
    </div>

    <style>

        #control-container {
            padding: 0px !important;
        }
    </style>
</body>

</html>

Learning Resources

UG

Bubble Chart User Guide Learn the available options to customize JavaScript bubble chart.

API

Bubble Chart API Reference

Explore the JavaScript bubble chart APIs.


65+ JAVASCRIPT UI CONTROLS

Scroll up icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon