Markers

Learn how to customize markers in Nuxt Charts to highlight data points with custom shapes, sizes, and colors.

Customizing Markers in Nuxt Charts

Markers highlight data points on your charts. Nuxt Charts allows you to customize marker type, size, color, and stroke to match your data and design.

Basic Marker Configuration

You can configure markers using the :marker-config prop. For example:

Required Marker Styles

To ensure markers display correctly, add the following CSS to your component:

marker-styles.vue
<style scoped>
/* Stroke maps to color key in categories */
/* The color should match the color defined in categories */
.markers:deep(*[stroke='#3b82f6']) {
  marker: url('#circle-marker-desktop');
}
</style>

Custom Marker Example

You can fully customize markers for each series or data point. See the example below for a custom marker configuration.