mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
[improve][radar]improve radar chart
This commit is contained in:
@@ -385,7 +385,7 @@ namespace XCharts.Runtime
|
||||
SetAllDirty();
|
||||
}
|
||||
|
||||
public RadarCoord.Indicator AddIndicator(string name, float min, float max)
|
||||
public RadarCoord.Indicator AddIndicator(string name, double min, double max)
|
||||
{
|
||||
var indicator = new RadarCoord.Indicator();
|
||||
indicator.name = name;
|
||||
@@ -396,7 +396,14 @@ namespace XCharts.Runtime
|
||||
return indicator;
|
||||
}
|
||||
|
||||
public bool UpdateIndicator(int indicatorIndex, string name, float min, float max)
|
||||
[Since("v3.3.0")]
|
||||
public void AddIndicatorList(List<string> nameList, double min = 0, double max = 0)
|
||||
{
|
||||
foreach (var name in nameList)
|
||||
AddIndicator(name, min, max);
|
||||
}
|
||||
|
||||
public bool UpdateIndicator(int indicatorIndex, string name, double min, double max)
|
||||
{
|
||||
var indicator = GetIndicator(indicatorIndex);
|
||||
if (indicator == null) return false;
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace XCharts.Runtime
|
||||
var lineType = radar.axisLine.GetType(chart.theme.axis.lineType);
|
||||
var splitLineColor = radar.splitLine.GetColor(chart.theme.axis.splitLineColor);
|
||||
var splitLineWidth = radar.splitLine.GetWidth(chart.theme.axis.splitLineWidth);
|
||||
splitLineWidth *= 2f;
|
||||
for (int i = 0; i < radar.splitNumber; i++)
|
||||
{
|
||||
var color = radar.splitArea.GetColor(i, chart.theme.axis);
|
||||
|
||||
Reference in New Issue
Block a user