mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-30 21:38:49 +00:00
check null
This commit is contained in:
@@ -26,6 +26,8 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
protected override void UpdatePointerValue(Axis axis)
|
protected override void UpdatePointerValue(Axis axis)
|
||||||
{
|
{
|
||||||
|
if (axis == null)
|
||||||
|
return;
|
||||||
var polar = chart.GetChartComponent<PolarCoord>(axis.polarIndex);
|
var polar = chart.GetChartComponent<PolarCoord>(axis.polarIndex);
|
||||||
if (polar == null)
|
if (polar == null)
|
||||||
return;
|
return;
|
||||||
@@ -47,6 +49,7 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
private void UpdateAxisMinMaxValue(RadiusAxis axis, bool updateChart = true)
|
private void UpdateAxisMinMaxValue(RadiusAxis axis, bool updateChart = true)
|
||||||
{
|
{
|
||||||
|
if (axis == null) return;
|
||||||
if (axis.IsCategory() || !axis.show) return;
|
if (axis.IsCategory() || !axis.show) return;
|
||||||
double tempMinValue = 0;
|
double tempMinValue = 0;
|
||||||
double tempMaxValue = 0;
|
double tempMaxValue = 0;
|
||||||
@@ -70,6 +73,8 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
internal void UpdateAxisLabelText(RadiusAxis axis)
|
internal void UpdateAxisLabelText(RadiusAxis axis)
|
||||||
{
|
{
|
||||||
|
if (axis == null)
|
||||||
|
return;
|
||||||
var polar = chart.GetChartComponent<PolarCoord>(axis.polarIndex);
|
var polar = chart.GetChartComponent<PolarCoord>(axis.polarIndex);
|
||||||
if (axis.context.labelObjectList.Count <= 0)
|
if (axis.context.labelObjectList.Count <= 0)
|
||||||
InitRadiusAxis(axis);
|
InitRadiusAxis(axis);
|
||||||
@@ -144,6 +149,9 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
private void DrawRadiusAxis(VertexHelper vh, RadiusAxis radiusAxis)
|
private void DrawRadiusAxis(VertexHelper vh, RadiusAxis radiusAxis)
|
||||||
{
|
{
|
||||||
|
if (radiusAxis == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var polar = chart.GetChartComponent<PolarCoord>(radiusAxis.polarIndex);
|
var polar = chart.GetChartComponent<PolarCoord>(radiusAxis.polarIndex);
|
||||||
if (polar == null)
|
if (polar == null)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user