[bug] fix multipe grid error (#210)

This commit is contained in:
monitor1394
2022-07-05 21:43:09 +08:00
parent a499002426
commit 9aa8431432
11 changed files with 33 additions and 73 deletions

View File

@@ -423,5 +423,22 @@ namespace XCharts.Runtime
}
return null;
}
internal bool GetSerieGridCoordAxis(Serie serie, out Axis axis, out Axis relativedAxis)
{
var yAxis = GetChartComponent<YAxis>(serie.yAxisIndex);
var isY = yAxis.IsCategory();
if (isY)
{
axis = yAxis;
relativedAxis = GetChartComponent<XAxis>(serie.xAxisIndex);
}
else
{
axis = GetChartComponent<XAxis>(serie.xAxisIndex);
relativedAxis = yAxis;
}
return isY;
}
}
}

View File

@@ -9,7 +9,7 @@ namespace XCharts.Runtime
[System.Serializable]
public class MainComponent : IComparable
{
public int instanceId { get; internal set; }
public int instanceId { get { return index; } }
public int index { get; internal set; }
protected bool m_VertsDirty;
protected bool m_ComponentDirty;