View source
// CDN build: `ApexMaps` is a global (see index.html). With a bundler:
//   import ApexMaps from 'apexmaps'

// Basemap only. Geometry with no series still renders, with labels, hover and
// tooltips: when no series is configured the map draws a basemap pseudo-series,
// so hit testing, labelling and accessibility all work as they do with data.
const map = new ApexMaps(document.getElementById('map'), {
  chart: { height: 440 },
  geo: { map: 'world/countries@110m', projection: 'naturalEarth' },
  // Labels are laid out in screen space each frame and dropped where they would
  // overlap, largest feature first. `minFeatureArea` skips shapes too small to
  // carry a label; zoom in and more appear as the collisions resolve.
  dataLabels: { enabled: true, minFeatureArea: 900 },
})

map.render()
Basemap - ApexMaps Demo | ApexCharts.js