增加Line支持X轴和Y轴都为Category类目轴

This commit is contained in:
monitor1394
2024-01-23 22:55:46 +08:00
parent 653b81cc48
commit 9e39150009
3 changed files with 18 additions and 11 deletions

View File

@@ -459,13 +459,14 @@ namespace XCharts.Runtime
internal bool GetSerieGridCoordAxis(Serie serie, out Axis axis, out Axis relativedAxis)
{
var yAxis = GetChartComponent<YAxis>(serie.yAxisIndex);
if (yAxis == null)
var xAxis = GetChartComponent<XAxis>(serie.xAxisIndex);
if (xAxis == null || yAxis == null)
{
axis = null;
relativedAxis = null;
return false;
}
var isY = yAxis.IsCategory();
var isY = yAxis.IsCategory() && !xAxis.IsCategory();
if (isY)
{
axis = yAxis;