3.0 - liquid chart and ring chart

This commit is contained in:
monitor1394
2022-01-22 22:58:55 +08:00
parent d9840bef52
commit a32f5f5bcf
8 changed files with 67 additions and 48 deletions

View File

@@ -63,8 +63,6 @@ namespace XCharts
m_NeedInitComponent = true;
}
public override void Update()
{
if (m_NeedInitComponent)
@@ -280,7 +278,7 @@ namespace XCharts
return;
var colorIndex = chart.GetLegendRealShowNameIndex(serie.legendName);
var total = serie.yTotal;
var total = serie.GetDataTotal(defaultDimension);
var isNeedInvertPositionSerie = serie is Line;
foreach (var serieData in serie.data)
@@ -303,9 +301,10 @@ namespace XCharts
&& serieData.context.canShowLabel
&& !isIgnore)
{
var value = serieData.GetData(defaultDimension);
var content = serie.useDataNameForColor && string.IsNullOrEmpty(currLabel.formatter)
? serieData.name
: SerieLabelHelper.GetFormatterContent(serie, serieData, serieData.GetData(defaultDimension), total,
: SerieLabelHelper.GetFormatterContent(serie, serieData, value, total,
currLabel, chart.theme.GetColor(colorIndex));
var invert = currLabel.autoOffset