mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 07:20:08 +00:00
增加SerieData的radius自定义数据项的半径
This commit is contained in:
20
Demo/Scripts/Demo30_Pie.cs
Normal file
20
Demo/Scripts/Demo30_Pie.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XCharts;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo30_Pie : MonoBehaviour
|
||||
{
|
||||
private PieChart chart;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<PieChart>();
|
||||
if (chart == null) return;
|
||||
|
||||
var serie = chart.series.GetSerie(0);
|
||||
var serieData = serie.GetSerieData(0);
|
||||
serieData.radius = 100;
|
||||
}
|
||||
}
|
||||
11
Demo/Scripts/Demo30_Pie.cs.meta
Normal file
11
Demo/Scripts/Demo30_Pie.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00a8daeea9dce492c8c1ed93c90ae409
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user