Body mass by species

Vertical swarms per species with a median tick.

Chart type
Beeswarm beeswarm
Tier
Free Core
Collection
Beeswarm
Render
Live, embedded example
View .md Agent setup
LIVE/beeswarm/body-mass-by-species2 of 4 in Beeswarm

Configuration

Raw Standalone
// First chart on this page. The example combines several charts or controls;
// open the standalone example for the full source.
const options = {
  chart: {
    height: 400,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "beeswarm",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Body mass (g)",
      data: [
        {
          x: "Adélie",
          y: [2530, 2754, 3838, 4299, 4025, 3168, 3350, 3904, 4242, 4700, 3639, 3584, 4058, 3296, 3278, 4161, 3638, 4537, 3571, 3140, 3248, 4289, 3897, 3524, 3101, 3541, 3624, 4448, 3525, 3145, 3875, 4225, 3392, 3577, 4105, 3369, 3212, 2902, 3344, 4062, 3649, 3405, 3008, 4113, 3614, 2955, 3728, 4299, 4128, 3795, 3141, 3755, 3952, 3613, 3484, 3852, 3472, 3523, 3421, 3585, 3545, 3635, 3603, 3153, 4523, 3213, 3239, 3960, 3824, 3728, 3521, 3961, 4096, 4093, 3318, 1972, 3698, 3987, 3518, 3594, 3229, 4158, 3612, 3701, 3679, 3859, 3361, 3446, 3192, 3695, 3744, 3368, 3918, 4280, 3940, 3555, 4213, 3596, 3594, 3534, 3008, 3821, 3135, 3114, 3551, 3879, 2924, 4004, 4062, 3248]
        },
        {
          x: "Chinstrap",
          y: [4079, 3851, 3451, 3725, 3037, 3385, 3669, 4263, 3458, 3895, 3526, 3524, 3220, 3646, 4197, 4389, 3871, 3822, 3596, 3820, 3704, 3918, 3572, 4125, 3780, 3708, 3545, 3856, 3889, 3131, 4527, 3081, 3202, 3785, 3227, 4315, 4768, 3974, 4285, 3513, 3663, 4118, 3830, 4016, 3292, 3610, 4151, 4616, 3355, 3448, 3732, 3681, 3648, 3434, 3539, 3498, 3293, 4722, 3749, 3312, 3167, 3884, 4038, 3968, 4083, 3615, 3678, 4233, 3594, 3927, 3121, 3500, 2895, 4045, 3737, 3608, 3920, 3826, 3941, 3764, 4096, 3591, 3346, 4051, 3334, 3836, 3434, 4047, 3597, 3843, 3780, 4292, 3865, 2935, 3561, 3120, 3592, 3825, 4557, 2960, 3234, 3855, 4381, 3495, 3926, 3681, 3626, 3211, 4326, 3650]
        },
        {
          x: "Gentoo",
          y: [5845, 4791, 5912, 4752, 4468, 4526, 4576, 5431, 5402, 3953, 4904, 5125, 5480, 4677, 5909, 5059, 5077, 4695, 6099, 5691, 4813, 5162, 5748, 5004, 4580, 5049, 5340, 4785, 5307, 5117, 5465, 5171, 5375, 4373, 4762, 5329, 5093, 5827, 5159, 5347, 5028, 5190, 4045, 5110, 4869, 5817, 5143, 5337, 5381, 4408, 5055, 5479, 5578, 4449, 4448, 5304, 6233, 4856, 4889, 5097, 4564, 5370, 5100, 5237, 5678, 4747, 5511, 5332, 5023, 4910, 4107, 5420, 5079, 5129, 4623, 5546, 5113, 4672, 6162, 5632, 5078, 5297, 5283, 5139, 5373, 5246, 4731, 5753, 5730, 4658, 4729, 5141, 3620, 5489, 5594, 5068, 5256, 4292, 6200, 5116, 4756, 5275, 5166, 5695, 5317, 5521, 5185, 4735, 5402, 4738]
        }
      ]
    }
  ],
  plotOptions: {
    bar: {
      distributed: true
    }
  },
  yaxis: {
    labels: {
      formatter: (v) => (v == null ? '–' : (Math.abs(v) >= 1000 ? (Math.round((v / 1000) * 10) / 10) + 'k' : String(Math.round(v)))).replace('-', '\u2212')
    }
  },
  title: {
    text: "Penguin body mass (simulated)"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}