mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-14 06:22:10 +08:00
feat:折线图支持平滑曲线
This commit is contained in:
parent
e46dfba116
commit
e3a2ba8817
@ -7,6 +7,7 @@ import dataJson from './data.json'
|
|||||||
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
||||||
export const seriesItem = {
|
export const seriesItem = {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
smooth: false,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
|
@ -15,6 +15,12 @@
|
|||||||
<SettingItem name="类型">
|
<SettingItem name="类型">
|
||||||
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
|
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem >
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="item.smooth" size="small"/>
|
||||||
|
<n-text>平滑曲线</n-text>
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
<SettingItemBox name="实心点">
|
<SettingItemBox name="实心点">
|
||||||
<SettingItem name="大小">
|
<SettingItem name="大小">
|
||||||
|
@ -11,6 +11,7 @@ export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
|||||||
const options = {
|
const options = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
show: true,
|
show: true,
|
||||||
|
smooth: false,
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'line'
|
type: 'line'
|
||||||
|
@ -15,6 +15,12 @@
|
|||||||
<SettingItem name="类型">
|
<SettingItem name="类型">
|
||||||
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
|
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem>
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="item.smooth" size="small"/>
|
||||||
|
<n-text>平滑曲线</n-text>
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
<SettingItemBox name="实心点">
|
<SettingItemBox name="实心点">
|
||||||
<SettingItem name="大小">
|
<SettingItem name="大小">
|
||||||
|
@ -23,6 +23,12 @@
|
|||||||
:options="lineConf.lineStyle.type"
|
:options="lineConf.lineStyle.type"
|
||||||
></n-select>
|
></n-select>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem>
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="item.smooth" size="small"/>
|
||||||
|
<n-text>平滑曲线</n-text>
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
<SettingItemBox name="实心点">
|
<SettingItemBox name="实心点">
|
||||||
<SettingItem name="大小">
|
<SettingItem name="大小">
|
||||||
|
@ -27,6 +27,7 @@ export const option = {
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
smooth: true,
|
||||||
symbolSize: 5, //设定实心点的大小
|
symbolSize: 5, //设定实心点的大小
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: 'solid',
|
type: 'solid',
|
||||||
|
@ -38,6 +38,12 @@
|
|||||||
:options="lineConf.lineStyle.type"
|
:options="lineConf.lineStyle.type"
|
||||||
></n-select>
|
></n-select>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem>
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="item.smooth" size="small"/>
|
||||||
|
<n-text>平滑曲线</n-text>
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
<SettingItemBox name="实心点">
|
<SettingItemBox name="实心点">
|
||||||
<SettingItem name="大小">
|
<SettingItem name="大小">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user