feat:折线图支持平滑曲线

This commit is contained in:
dingxs 2023-05-15 10:30:36 +08:00
parent e46dfba116
commit e3a2ba8817
7 changed files with 27 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import dataJson from './data.json'
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
export const seriesItem = {
type: 'line',
smooth: false,
label: {
show: true,
position: 'top',

View File

@ -15,6 +15,12 @@
<SettingItem name="类型">
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
</SettingItem>
<SettingItem >
<n-space>
<n-switch v-model:value="item.smooth" size="small"/>
<n-text>平滑曲线</n-text>
</n-space>
</SettingItem>
</SettingItemBox>
<SettingItemBox name="实心点">
<SettingItem name="大小">

View File

@ -11,6 +11,7 @@ export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
const options = {
tooltip: {
show: true,
smooth: false,
trigger: 'axis',
axisPointer: {
type: 'line'

View File

@ -15,6 +15,12 @@
<SettingItem name="类型">
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
</SettingItem>
<SettingItem>
<n-space>
<n-switch v-model:value="item.smooth" size="small"/>
<n-text>平滑曲线</n-text>
</n-space>
</SettingItem>
</SettingItemBox>
<SettingItemBox name="实心点">
<SettingItem name="大小">

View File

@ -23,6 +23,12 @@
:options="lineConf.lineStyle.type"
></n-select>
</SettingItem>
<SettingItem>
<n-space>
<n-switch v-model:value="item.smooth" size="small"/>
<n-text>平滑曲线</n-text>
</n-space>
</SettingItem>
</SettingItemBox>
<SettingItemBox name="实心点">
<SettingItem name="大小">

View File

@ -27,6 +27,7 @@ export const option = {
series: [
{
type: 'line',
smooth: true,
symbolSize: 5, //设定实心点的大小
lineStyle: {
type: 'solid',

View File

@ -38,6 +38,12 @@
:options="lineConf.lineStyle.type"
></n-select>
</SettingItem>
<SettingItem>
<n-space>
<n-switch v-model:value="item.smooth" size="small"/>
<n-text>平滑曲线</n-text>
</n-space>
</SettingItem>
</SettingItemBox>
<SettingItemBox name="实心点">
<SettingItem name="大小">