您的位置:首页 > 新闻 > 会展 > apexcharts数据可视化之极坐标区域图

apexcharts数据可视化之极坐标区域图

2024/10/14 6:14:18 来源:https://blog.csdn.net/qq_37703224/article/details/139259123  浏览:    关键词:apexcharts数据可视化之极坐标区域图

apexcharts数据可视化之极坐标区域图

有完整配套的Python后端代码。

本教程主要会介绍如下图形绘制方式:

  • 基础极坐标区域图
  • 单色极坐标区域图

基础极坐标区域图

import ApexChart from 'react-apexcharts';export function BasicPolar() {// 数据序列const series = [14, 23, 21, 17, 15, 10, 12, 17, 21]// 图表选项const options = {chart: {type: 'polarArea',},stroke: {colors: ['#fff']},labels: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月"],fill: {opacity: 0.8},responsive: [{breakpoint: 480,options: {chart: {width: 200},legend: {position: 'bottom'}}}]}return (<div id="chart"><ApexChart options={options} series={series} type="polarArea" height={550}/></div>)
}

在这里插入图片描述

单色极坐标区域图

import ApexChart from 'react-apexcharts';export function MonochromePolarArea() {// 数据序列const series = [14, 23, 21, 17, 15, 10, 12, 17, 21]// 图表选项const options = {chart: {type: 'polarArea',},fill: {opacity: 1},stroke: {width: 1,colors: undefined},yaxis: {show: false},legend: {position: 'bottom'},labels: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月"],// 绘制选项plotOptions: {polarArea: {rings: {strokeWidth: 0},spokes: {strokeWidth: 0},}},// 主题theme: {monochrome: {enabled: true,shadeTo: 'light',shadeIntensity: 0.6}},responsive: [{breakpoint: 480,options: {chart: {width: 200},legend: {position: 'bottom'}}}]}return (<div id="chart"><ApexChart options={options} series={series} type="polarArea" height={550}/></div>)
}

在这里插入图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com