[feature][polar] support bar and ring polar

This commit is contained in:
monitor1394
2022-09-16 08:03:14 +08:00
parent afbfa20fd9
commit ba9faa8bc6
13 changed files with 283 additions and 61 deletions

View File

@@ -443,6 +443,12 @@ namespace XCharts.Runtime
internal bool GetSerieGridCoordAxis(Serie serie, out Axis axis, out Axis relativedAxis)
{
var yAxis = GetChartComponent<YAxis>(serie.yAxisIndex);
if (yAxis == null)
{
axis = null;
relativedAxis = null;
return false;
}
var isY = yAxis.IsCategory();
if (isY)
{

View File

@@ -579,23 +579,25 @@ namespace XCharts.Runtime
serie.context.dataIndexs.Clear();
serie.context.dataIgnores.Clear();
serie.animation.context.isAllItemAnimationEnd = true;
if (!serie.context.pointerEnter)
serie.ResetInteract();
if (m_OnDrawSerieBefore != null)
if (serie.show && !serie.animation.HasFadeOut())
{
m_OnDrawSerieBefore.Invoke(vh, serie);
}
DrawPainterSerie(vh, serie);
if (i >= 0 && i < m_SerieHandlers.Count)
{
var handler = m_SerieHandlers[i];
handler.DrawSerie(vh);
handler.RefreshLabelNextFrame();
}
if (m_OnDrawSerieAfter != null)
{
m_OnDrawSerieAfter(vh, serie);
if (!serie.context.pointerEnter)
serie.ResetInteract();
if (m_OnDrawSerieBefore != null)
{
m_OnDrawSerieBefore.Invoke(vh, serie);
}
DrawPainterSerie(vh, serie);
if (i >= 0 && i < m_SerieHandlers.Count)
{
var handler = m_SerieHandlers[i];
handler.DrawSerie(vh);
handler.RefreshLabelNextFrame();
}
if (m_OnDrawSerieAfter != null)
{
m_OnDrawSerieAfter(vh, serie);
}
}
serie.context.vertCount = vh.currentVertCount;
}