mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-29 20:58:47 +00:00
[improve][radar]improve radar chart
This commit is contained in:
@@ -58,7 +58,8 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
* (2022.08.30) 修复`DataZoom`某些情况下计算范围不准确的问题 (#221)
|
* (2022.08.30) 优化`RadarChart`
|
||||||
|
* (2022.08.30) 修复`DataZoom`在某些情况下计算范围不准确的问题 (#221)
|
||||||
* (2022.08.29) 优化`BarChart`在数据过密时的默认表现
|
* (2022.08.29) 优化`BarChart`在数据过密时的默认表现
|
||||||
* (2022.08.29) 优化`YAxis`在开启`DataZoom`时的最大最小值计算
|
* (2022.08.29) 优化`YAxis`在开启`DataZoom`时的最大最小值计算
|
||||||
* (2022.08.29) 优化`CandlestickChart`大量数据绘制
|
* (2022.08.29) 优化`CandlestickChart`大量数据绘制
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ namespace XCharts.Runtime
|
|||||||
SetAllDirty();
|
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();
|
var indicator = new RadarCoord.Indicator();
|
||||||
indicator.name = name;
|
indicator.name = name;
|
||||||
@@ -396,7 +396,14 @@ namespace XCharts.Runtime
|
|||||||
return indicator;
|
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);
|
var indicator = GetIndicator(indicatorIndex);
|
||||||
if (indicator == null) return false;
|
if (indicator == null) return false;
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ namespace XCharts.Runtime
|
|||||||
var lineType = radar.axisLine.GetType(chart.theme.axis.lineType);
|
var lineType = radar.axisLine.GetType(chart.theme.axis.lineType);
|
||||||
var splitLineColor = radar.splitLine.GetColor(chart.theme.axis.splitLineColor);
|
var splitLineColor = radar.splitLine.GetColor(chart.theme.axis.splitLineColor);
|
||||||
var splitLineWidth = radar.splitLine.GetWidth(chart.theme.axis.splitLineWidth);
|
var splitLineWidth = radar.splitLine.GetWidth(chart.theme.axis.splitLineWidth);
|
||||||
|
splitLineWidth *= 2f;
|
||||||
for (int i = 0; i < radar.splitNumber; i++)
|
for (int i = 0; i < radar.splitNumber; i++)
|
||||||
{
|
{
|
||||||
var color = radar.splitArea.GetColor(i, chart.theme.axis);
|
var color = radar.splitArea.GetColor(i, chart.theme.axis);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
public int containerIndex { get; internal set; }
|
public int containerIndex { get; internal set; }
|
||||||
public int containterInstanceId { get; internal set; }
|
public int containterInstanceId { get; internal set; }
|
||||||
public override SerieColorBy defaultColorBy { get { return radarType == RadarType.Multiple?SerieColorBy.Serie : SerieColorBy.Data; } }
|
public override SerieColorBy defaultColorBy { get { return radarType == RadarType.Multiple?SerieColorBy.Data : SerieColorBy.Serie; } }
|
||||||
public override bool multiDimensionLabel { get { return radarType == RadarType.Multiple; } }
|
public override bool multiDimensionLabel { get { return radarType == RadarType.Multiple; } }
|
||||||
|
|
||||||
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
|
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
|
||||||
|
|||||||
@@ -320,7 +320,6 @@ namespace XCharts.Runtime
|
|||||||
serieData.interact.SetValue(ref interacting, symbolSize);
|
serieData.interact.SetValue(ref interacting, symbolSize);
|
||||||
symbolSize = serie.animation.GetSysmbolSize(symbolSize);
|
symbolSize = serie.animation.GetSysmbolSize(symbolSize);
|
||||||
}
|
}
|
||||||
colorIndex = serie.colorByData ? m : colorIndex;
|
|
||||||
SerieHelper.GetItemColor(out symbolColor, out symbolToColor, out symbolEmptyColor, serie, serieData, chart.theme, colorIndex, serieState);
|
SerieHelper.GetItemColor(out symbolColor, out symbolToColor, out symbolEmptyColor, serie, serieData, chart.theme, colorIndex, serieState);
|
||||||
SerieHelper.GetSymbolInfo(out borderColor, out symbolBorder, out cornerRadius, serie, serieData, chart.theme, serieState);
|
SerieHelper.GetSymbolInfo(out borderColor, out symbolBorder, out cornerRadius, serie, serieData, chart.theme, serieState);
|
||||||
chart.DrawSymbol(vh, symbol.type, symbolSize, symbolBorder, point, symbolColor,
|
chart.DrawSymbol(vh, symbol.type, symbolSize, symbolBorder, point, symbolColor,
|
||||||
|
|||||||
Reference in New Issue
Block a user