mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 00:20:18 +00:00
3.10.0
This commit is contained in:
@@ -15,6 +15,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<BarChart>();
|
||||
chart.Init();
|
||||
}
|
||||
var serie = chart.GetSerie(0);
|
||||
serie.animation.enable = true;
|
||||
|
||||
@@ -40,7 +40,10 @@ namespace XCharts.Example
|
||||
IEnumerator AddSimpleLine()
|
||||
{
|
||||
chart = gameObject.GetComponent<LineChart>();
|
||||
if (chart == null) chart = gameObject.AddComponent<LineChart>();
|
||||
if (chart == null){
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
chart.Init();
|
||||
}
|
||||
chart.GetChartComponent<Title>().text = "LineChart - 折线图";
|
||||
chart.GetChartComponent<Title>().subText = "普通折线图";
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
chart.Init();
|
||||
}
|
||||
chart.EnsureChartComponent<Title>().show = true;
|
||||
chart.EnsureChartComponent<Title>().text = "Sin Curve";
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
chart.SetSize(580, 300);
|
||||
chart.Init();
|
||||
}
|
||||
chart.EnsureChartComponent<Title>().show = true;
|
||||
chart.EnsureChartComponent<Title>().text = "Line Simple";
|
||||
|
||||
@@ -38,7 +38,11 @@ namespace XCharts.Example
|
||||
IEnumerator AddSimpleBar()
|
||||
{
|
||||
chart = gameObject.GetComponent<BarChart>();
|
||||
if (chart == null) chart = gameObject.AddComponent<BarChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<BarChart>();
|
||||
chart.Init();
|
||||
}
|
||||
chart.EnsureChartComponent<Title>().text = "BarChart - 柱状图";
|
||||
chart.EnsureChartComponent<Title>().subText = "普通柱状图";
|
||||
|
||||
|
||||
@@ -38,7 +38,11 @@ namespace XCharts.Example
|
||||
IEnumerator PieAdd()
|
||||
{
|
||||
chart = gameObject.GetComponent<PieChart>();
|
||||
if (chart == null) chart = gameObject.AddComponent<PieChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<PieChart>();
|
||||
chart.Init();
|
||||
}
|
||||
yield return null;
|
||||
chart.GetChartComponent<Title>().text = "PieChart - 饼图";
|
||||
chart.GetChartComponent<Title>().subText = "基础饼图";
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<PieChart>();
|
||||
chart.Init();
|
||||
}
|
||||
var serieIndex = 0;
|
||||
var serie = chart.GetSerie(serieIndex);
|
||||
|
||||
@@ -40,7 +40,11 @@ namespace XCharts.Example
|
||||
IEnumerator RadarAdd()
|
||||
{
|
||||
chart = gameObject.GetComponent<RadarChart>();
|
||||
if (chart == null) chart = gameObject.AddComponent<RadarChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<RadarChart>();
|
||||
chart.Init();
|
||||
}
|
||||
|
||||
chart.RemoveChartComponents<RadarCoord>();
|
||||
chart.RemoveData();
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<RadarChart>();
|
||||
chart.Init();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<HeatmapChart>();
|
||||
chart.Init();
|
||||
}
|
||||
chart.GetChartComponent<Title>().text = "HeatmapChart";
|
||||
chart.GetChartComponent<Tooltip>().type = Tooltip.Type.None;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<BaseChart>();
|
||||
chart.Init();
|
||||
}
|
||||
chart.EnsureChartComponent<PolarCoord>();
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace XCharts.Example
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<CandlestickChart>();
|
||||
chart.Init();
|
||||
}
|
||||
AddData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user