mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 15:30:09 +00:00
3.0
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -7,6 +6,8 @@ namespace XCharts.Runtime
|
||||
[System.Serializable]
|
||||
[SerieHandler(typeof(ParallelHandler), true)]
|
||||
[RequireChartComponent(typeof(ParallelCoord))]
|
||||
[SerieDataExtraComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(EmphasisItemStyle), typeof(EmphasisLabelStyle))]
|
||||
[SerieDataExtraField()]
|
||||
public class Parallel : Serie, INeedSerieContainer
|
||||
{
|
||||
public int containerIndex { get; internal set; }
|
||||
@@ -19,12 +20,13 @@ namespace XCharts.Runtime
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
var data = new List<double>(){
|
||||
Random.Range(0f,50f),
|
||||
Random.Range(0f,100f),
|
||||
Random.Range(0f,1000f),
|
||||
Random.Range(0,5),
|
||||
};
|
||||
var data = new List<double>()
|
||||
{
|
||||
Random.Range(0f, 50f),
|
||||
Random.Range(0f, 100f),
|
||||
Random.Range(0f, 1000f),
|
||||
Random.Range(0, 5),
|
||||
};
|
||||
serie.AddData(data, "data" + i);
|
||||
}
|
||||
chart.RefreshChart();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -23,8 +22,7 @@ namespace XCharts.Runtime
|
||||
}
|
||||
|
||||
private void UpdateSerieContext()
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
private void DrawParallelSerie(VertexHelper vh, Parallel serie)
|
||||
{
|
||||
@@ -44,13 +42,13 @@ namespace XCharts.Runtime
|
||||
var lineColor = SerieHelper.GetLineColor(serie, null, chart.theme, serie.context.colorIndex, false);
|
||||
var lineWidth = serie.lineStyle.GetWidth(chart.theme.serie.lineWidth);
|
||||
|
||||
float currDetailProgress = !isHorizonal
|
||||
? parallel.context.x
|
||||
: parallel.context.y;
|
||||
float currDetailProgress = !isHorizonal ?
|
||||
parallel.context.x :
|
||||
parallel.context.y;
|
||||
|
||||
float totalDetailProgress = !isHorizonal
|
||||
? parallel.context.x + parallel.context.width
|
||||
: parallel.context.y + parallel.context.height;
|
||||
float totalDetailProgress = !isHorizonal ?
|
||||
parallel.context.x + parallel.context.width :
|
||||
parallel.context.y + parallel.context.height;
|
||||
|
||||
serie.animation.InitProgress(currDetailProgress, totalDetailProgress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user