海拔图和小地图
This commit is contained in:
1 parent
42fa59d103
commit
8ad36c965d
521 files changed
+1985033
-439
No files matched your search
@@ -0,0 +1,44 @@
|
||||
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AddComponentMenu("XCharts/LineChart", 13)]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
[DisallowMultipleComponent]
|
||||
public class LineChart : CoordinateChart
|
||||
{
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
title.text = "LineChart";
|
||||
tooltip.type = Tooltip.Type.Line;
|
||||
|
||||
visualMap.enable = false;
|
||||
visualMap.show = false;
|
||||
visualMap.autoMinMax = true;
|
||||
visualMap.direction = VisualMap.Direction.Y;
|
||||
visualMap.inRange.Clear();
|
||||
visualMap.inRange.Add(Color.blue);
|
||||
visualMap.inRange.Add(Color.red);
|
||||
|
||||
RemoveData();
|
||||
SerieTemplate.AddDefaultLineSerie(this, "serie1");
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
AddXAxisData("x" + (i + 1));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user