# Scaling a Bubble Chart While Zooming

## Content



To scale the **Bubble** chart while zooming, adjust the scale in the [PlotElementLoaded](/componentone/api/wpf/online-chart/dotnet-framework-api/C1.WPF.C1Chart.4.6.2/C1.WPF.C1Chart.DataSeries.PlotElementLoaded.html) event like the following:

```csharp
var ds = new BubbleSeries()
{
XValuesSource = new double[] { 1, 2, 3, 4 },
ValuesSource = new double[] { 1, 2, 3, 4 },
SizeValuesSource = new double[] { 1, 2, 3, 4 },
};
ds.PlotElementLoaded += (s, e) =>
{
var pe = (PlotElement)s;
pe.RenderTransform = new ScaleTransform()
{
ScaleX = 1.0 / chart.View.AxisX.Scale,
ScaleY = 1.0 / chart.View.AxisY.Scale
};
pe.RenderTransformOrigin = new Point(0.5, 0.5);
};
chart.Data.Children.Add(ds);
chart.ChartType = ChartType.Bubble;
chart.Actions.Add(new TranslateAction());
chart.Actions.Add(new ScaleAction() { Modifiers = ModifierKeys.Control });
```

## See Also

[Markers Labels](/componentone/docs/wpf/online-chart/overview/ChartFeatures/MarkersLabels)