29 lines
688 B
C#
29 lines
688 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
using XCharts.Runtime;
|
|
|
|
public class LineChart : MonoBehaviour
|
|
{
|
|
|
|
void Start()
|
|
{
|
|
LineChart chart = GetComponent<LineChart>();
|
|
DataZoom dataZoom = chart.GetComponent<DataZoom>();
|
|
|
|
dataZoom.enable = true;
|
|
dataZoom.supportInside = true; // 启用鼠标拖拽和滚轮缩放
|
|
dataZoom.supportSlider = true; // 显示底部滑动条
|
|
dataZoom.zoomLock = false; // 允许缩放
|
|
// 设置初始显示范围为50%到100%
|
|
dataZoom.start = 50;
|
|
dataZoom.end = 100;
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|