3.0 - polar chart

This commit is contained in:
monitor1394
2022-01-26 20:47:14 +08:00
parent a32f5f5bcf
commit cc4ee3735c
41 changed files with 566 additions and 165 deletions

View File

@@ -19,13 +19,14 @@ namespace XCharts
public int containerIndex { get; internal set; }
public int containterInstanceId { get; internal set; }
public static void AddDefaultSerie(BaseChart chart, string serieName)
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
{
var serie = chart.AddSerie<Bar>(serieName);
for (int i = 0; i < 5; i++)
{
chart.AddData(serie.index, UnityEngine.Random.Range(10, 90));
}
return serie;
}
public static Bar CovertSerie(Serie serie)

View File

@@ -228,7 +228,10 @@ namespace XCharts
serieData.context.stackHeight = barHig;
serieData.context.position = top;
serieData.context.rect = Rect.MinMaxRect(plb.x, plb.y, prb.x, prt.y);
serie.context.dataPoints.Add(top);
if (!serie.clip || (serie.clip && m_SerieGrid.Contains(top)))
serie.context.dataPoints.Add(top);
else
continue;
if (serie.show && currHig != 0 && !serie.placeHolder)
{
switch (serie.barType)

View File

@@ -15,7 +15,7 @@ namespace XCharts
public int containerIndex { get; internal set; }
public int containterInstanceId { get; internal set; }
public static void AddDefaultSerie(BaseChart chart, string serieName)
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
{
var serie = chart.AddSerie<SimplifiedBar>(serieName);
serie.symbol.show = false;
@@ -28,6 +28,7 @@ namespace XCharts
lastValue += UnityEngine.Random.Range(-3, 5);
chart.AddData(serie.index, lastValue);
}
return serie;
}
public static SimplifiedBar CovertSerie(Serie serie)