using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace XCharts.Runtime
{
///
/// The base class of all charts.
/// |所有Chart的基类。
///
public partial class BaseChart
{
///
/// The name of chart.
/// |
public string chartName
{
get { return m_ChartName; }
set
{
if (!string.IsNullOrEmpty(value) && XChartsMgr.ContainsChart(value))
{
Debug.LogError("chartName repeated:" + value);
}
else
{
m_ChartName = value;
}
}
}
///
/// The theme.
/// |
public ThemeStyle theme { get { return m_Theme; } set { m_Theme = value; } }
///
/// Global parameter setting component.
/// |全局设置组件。
///
public Settings settings { get { return m_Settings; } }
///
/// The x of chart.
/// |图表的X
///
public float chartX { get { return m_ChartX; } }
///
/// The y of chart.
/// |图表的Y
///
public float chartY { get { return m_ChartY; } }
///
/// The width of chart.
/// |图表的宽
///
public float chartWidth { get { return m_ChartWidth; } }
///
/// The height of chart.
/// |图表的高
///
public float chartHeight { get { return m_ChartHeight; } }
public Vector2 chartMinAnchor { get { return m_ChartMinAnchor; } }
public Vector2 chartMaxAnchor { get { return m_ChartMaxAnchor; } }
public Vector2 chartPivot { get { return m_ChartPivot; } }
public Vector2 chartSizeDelta { get { return m_ChartSizeDelta; } }
///
/// The position of chart.
/// |图表的左下角起始坐标。
///
public Vector3 chartPosition { get { return m_ChartPosition; } }
public Rect chartRect { get { return m_ChartRect; } }
public Action onInit { set { m_OnInit = value; } }
public Action onUpdate { set { m_OnUpdate = value; } }
///
/// 自定义绘制回调。在绘制Serie前调用。
///
public Action onDraw { set { m_OnDrawBase = value; } }
///
/// 自定义Serie绘制回调。在每个Serie绘制完前调用。
///
public Action onDrawBeforeSerie { set { m_OnDrawSerieBefore = value; } }
///
/// 自定义Serie绘制回调。在每个Serie绘制完后调用。
///
public Action onDrawAfterSerie { set { m_OnDrawSerieAfter = value; } }
///
/// 自定义Top绘制回调。在绘制Tooltip前调用。
///
public Action onDrawTop { set { m_OnDrawTop = value; } }
///
/// 自定义仪表盘指针绘制委托。
///
public CustomDrawGaugePointerFunction customDrawGaugePointerFunction { set { m_CustomDrawGaugePointerFunction = value; } get { return m_CustomDrawGaugePointerFunction; } }
///
/// the callback function of click pie area.
/// |点击饼图区域回调。参数:PointerEventData,SerieIndex,SerieDataIndex
///
public Action onPointerClickPie { set { m_OnPointerClickPie = value; m_ForceOpenRaycastTarget = true; } get { return m_OnPointerClickPie; } }
///
/// the callback function of click bar.
/// |点击柱形图柱条回调。参数:eventData, dataIndex
///
public Action onPointerClickBar { set { m_OnPointerClickBar = value; m_ForceOpenRaycastTarget = true; } get { return m_OnPointerClickBar; } }
///
/// 坐标轴变更数据索引时回调。参数:axis, dataIndex/dataValue
///
public Action onAxisPointerValueChanged { set { m_OnAxisPointerValueChanged = value; } get { return m_OnAxisPointerValueChanged; } }
///
/// the callback function of click legend.
/// |点击图例按钮回调。参数:legendIndex, legendName, show
///
public Action