<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="ChartSamples.Bubble" mc:Ignorable="d" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1chart="clr-namespace:C1.WPF.C1Chart;assembly=C1.WPF.C1Chart.4" xmlns:local="clr-namespace:ChartSamples" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
  <UserControl.Resources>
    <local:ToolTipConverter x:Key="ttc" />
    <DataTemplate x:Key="tooltip">
      <c1chart:DotSymbol>
        <c1chart:DotSymbol.ToolTip>
      <TextBlock Text="{Binding Converter={StaticResource ttc}}" Margin="2" />
        </c1chart:DotSymbol.ToolTip>
      </c1chart:DotSymbol>
    </DataTemplate>
    <ResourceDictionary x:Key="brushes">
      <LinearGradientBrush x:Key="0" EndPoint="1,0" StartPoint="0,0">
        <GradientStop Color="#FFFDEE50" Offset="0.17" />
        <GradientStop Color="#FFE0A608" Offset="0.33" />
        <GradientStop Color="#FFE0E0E0" Offset="0.33" />
        <GradientStop Color="#FF939393" Offset="0.67" />
        <GradientStop Color="#FFEEB979" Offset="0.67" />
        <GradientStop Color="#FFB1723E" Offset="0.83" />
      </LinearGradientBrush>
      <LinearGradientBrush x:Key="1" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFEEB979" Offset="0.4" />
        <GradientStop Color="#FFB1723E" Offset="0.6" />
      </LinearGradientBrush>
      <LinearGradientBrush x:Key="2" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFE0E0E0" Offset="0.4" />
        <GradientStop Color="#FF939393" Offset="0.6" />
      </LinearGradientBrush>
      <LinearGradientBrush x:Key="3" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFDEE50" Offset="0.4" />
        <GradientStop Color="#FFE0A608" Offset="0.6" />
      </LinearGradientBrush>
    </ResourceDictionary>
  </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition />
    </Grid.RowDefinitions>
		<TextBlock Text="Olymplic medals by country." Margin="0 0 0 10" />
      <c1chart:C1Chart Grid.Row="1" x:Name="chart" ChartType="Bubble" CustomPalette="{StaticResource brushes}" c1chart:BubbleOptions.Scale="Area" c1chart:BubbleOptions.MinSize="20,20" c1chart:BubbleOptions.MaxSize="80,80">
        <c1chart:C1Chart.Data>
                <c1chart:ChartData>
                    <c1chart:BubbleSeries Label="Total" Values="0 0 0 0 1 1 1 1 2 2 2 2" XValues="0 1 2 3 0 1 2 3 0 1 2 3" SizeValues="92 102 110 104 59 63 100 88 88 92 72 82" SymbolSize="14,14" Symbol="{StaticResource tooltip}" />
                    <c1chart:BubbleSeries Label="Bronze" Values="0 0 0 0 1 1 1 1 2 2 2 2" XValues=".2 1.2 2.2 3.2 .2 1.2 2.2 3.2 .2 1.2 2.2 3.2" SizeValues="31 27 36 29 15 14 28 23 28 38 28 32" SymbolSize="14,14" Symbol="{StaticResource tooltip}" />
                    <c1chart:BubbleSeries Label="Silver" Values="0 0 0 0 1 1 1 1 2 2 2 2" XValues="0 1 2 3 0 1 2 3 0 1 2 3" SizeValues="24 39 38 29 16 17 21 27 28 27 21 26" SymbolSize="14,14" Symbol="{StaticResource tooltip}" />
                    <c1chart:BubbleSeries Label="Gold" Values="0 0 0 0 1 1 1 1 2 2 2 2" XValues="-0.2 0.8 1.8 2.8 -0.2 0.8 1.8 2.8 -0.2 0.8 1.8 2.8" SizeValues="36 36 36 46 28 32 51 38 32 27 23 24" SymbolSize="14,14" Symbol="{StaticResource tooltip}" />
                </c1chart:ChartData>
            </c1chart:C1Chart.Data>
        <c1chart:C1ChartLegend />
    </c1chart:C1Chart>
  </Grid>
</UserControl>