# Bubble Chart \[Deprecated]

Bubble chart is derived from scatter chart and is used to emphasize the specific values in your chart using different bubble sizes.

**How to display bubble chart using Bunifu Dataviz**

Simply locate Bunifu Dataviz control in your toolbox and drag it to the location on your form where you would like to display it.&#x20;

We will use button click event handler to display our chart called render\_bubble\_chart

{% tabs %}
{% tab title="C#" %}

```csharp
private void render()
{
    var canvas = new Bunifu.Dataviz.WinForms.BunifuDatavizAdvanced.Canvas();
    var datapoint = new Bunifu.Dataviz.WinForms.BunifuDatavizAdvanced.DataPoint(Bunifu.Dataviz.WinForms.BunifuDatavizAdvanced._type.Bunifu_bubble);
    
    datapoint.addxy("new Date (2002,11,10)", new JArray(16.23, 17.99).ToString());
    datapoint.addxy("new Date (2002, 11, 9)", new JArray(15.95, 19.25).ToString());
    datapoint.addxy("new Date (2002, 11, 8)", new JArray(11.30, 16.88).ToString());
    datapoint.addxy("new Date (2002, 11, 7)", new JArray(13.29, 14.28).ToString());
    datapoint.addxy("new Date (2002, 11, 6)", new JArray(15.23, 16.45).ToString());
    datapoint.addxy("new Date (2002, 11, 5)", new JArray(13.70, 16.50).ToString());
    datapoint.addxy("new Date (2002, 11, 4)", new JArray(17.50, 19.00).ToString());
    datapoint.addxy("new Date (2002, 11, 3)", new JArray(19.50, 20.85).ToString());
    datapoint.addxy("new Date (2002, 11, 2)", new JArray(20.07, 21.44).ToString());
    datapoint.addxy("new Date (2002, 11, 1)", new JArray(25.00, 26.70).ToString());
    
    canvas.addData(datapoint);
    bunifuDataViz1.Render(canvas);
    
}
```

{% endtab %}

{% tab title="VB.NET" %}

```
Private Sub render()
    
    Dim canvas = New Bunifu.Dataviz.WinForms.BunifuDatavizAdvanced.Canvas()
    Dim datapoint = New Bunifu.Dataviz.WinForms.BunifuDatavizAdvanced.DataPoint(Bunifu.Dataviz.WinForms.BunifuDatavizAdvanced._type.Bunifu_bubble)
    
    datapoint.addxy("new Date (2002,11,10)", New JArray(16.23, 17.99).ToString())
    datapoint.addxy("new Date (2002, 11, 9)", New JArray(15.95, 19.25).ToString())
    datapoint.addxy("new Date (2002, 11, 8)", New JArray(11.30, 16.88).ToString())
    datapoint.addxy("new Date (2002, 11, 7)", New JArray(13.29, 14.28).ToString())
    datapoint.addxy("new Date (2002, 11, 6)", New JArray(15.23, 16.45).ToString())
    datapoint.addxy("new Date (2002, 11, 5)", New JArray(13.70, 16.50).ToString())
    datapoint.addxy("new Date (2002, 11, 4)", New JArray(17.50, 19.00).ToString())
    datapoint.addxy("new Date (2002, 11, 3)", New JArray(19.50, 20.85).ToString())
    datapoint.addxy("new Date (2002, 11, 2)", New JArray(20.07, 21.44).ToString())
    datapoint.addxy("new Date (2002, 11, 1)", New JArray(25.00, 26.70).ToString())
    
    canvas.addData(datapoint)
    bunifuDataViz1.Render(canvas)
    
End Sub
```

{% endtab %}
{% endtabs %}

In order to display bubble chart we need the following controls:

* &#x20;**Bunifu Data Viz** - This is the container for our chart
* &#x20;**Bunifu Canvas** - This is the middle layer between the data viz (container) and the dataset
* &#x20;**Bunifu Data Point** - This will contain the data that we want to represent as pairs of X and Y coordinates

On running the code you should see something like this:

![](https://downloads.intercomcdn.com/i/o/73619032/a0718d07c6896560030241bd/bubble-chart1%5B1%5D.png)

Also, if we change the line:

```
datapoint.addxy(r.Next(0, 100).ToString(), r.Next(10, 100).ToString());
```

with the following line

```
2 datapoint.addxy(i.ToString(), (1000 - i).ToString()); 
```

we will get the following result:

![](https://downloads.intercomcdn.com/i/o/73619509/0542bef338131bdda355bcdf/bubble-chart-2%5B1%5D.png)

That's it!

We hope Bunifu Dataviz will help you bring out the best data visualization for your data in your application.&#x20;

Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs2.bunifuframework.com/docs/dataviz/advanced-charts/bubble-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
