DevExtreme v26.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Vue Charts - Doughnut with Multiple Series

This demo illustrates the ability of the PieChart to display multiple series on a single chart. Different series are displayed as rings inside one another.

Backend API
<template> <DxPieChart id="pie" :data-source="exportImportData" :inner-radius="0.2" type="doughnut" palette="Ocean" > <DxTitle text="Imports/Exports of Goods and Services"> <DxSubtitle text="(billion US$, 2024)"/> </DxTitle> <DxLegend :visible="true"/> <DxExport :enabled="true"/> <DxCommonSeriesSettings> <DxLabel :visible="false"/> </DxCommonSeriesSettings> <DxTooltip :enabled="true" :customize-tooltip="customizeTooltip" format="currency" /> <DxSeries name="Export" argument-field="Country" value-field="Export" /> <DxSeries name="Import" argument-field="Country" value-field="Import" /> </DxPieChart> </template> <script setup lang="ts"> import DxPieChart, { DxCommonSeriesSettings, DxLegend, DxSeries, DxExport, DxLabel, DxTitle, DxTooltip, DxSubtitle, type DxPieChartTypes, } from 'devextreme-vue/pie-chart'; import { exportImportData } from './data.ts'; const customizeTooltip = ({ argumentText, seriesName, valueText }: DxPieChartTypes.PointInfo) => ({ text: `${argumentText}<br>${seriesName}: ${valueText}B`, }); </script> <style> #pie { height: 440px; } </style>
export const exportImportData = [{ Country: 'United States', Export: 2065, Import: 3359, }, { Country: 'Germany', Export: 1683, Import: 1425, }, { Country: 'Japan', Export: 707, Import: 743, }, { Country: 'United Kingdom', Export: 513, Import: 816, }, { Country: 'France', Export: 640, Import: 750, }, { Country: 'Italy', Export: 674, Import: 615, }, { Country: 'Canada', Export: 568, Import: 573, }, { Country: 'India', Export: 443, Import: 702, }, { Country: 'Brazil', Export: 337, Import: 278, }];
import { createApp } from 'vue'; import App from './App.vue'; createApp(App).mount('#app');
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="./bundle.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"> </div> </div> <script src="bundles/vendor/vue.vendor.js"></script> <script src="./bundle.js"></script> </body> </html>