private static TooltipViewItem CreateViewItem(int i, Transform parent, Tooltip tooltip, ComponentTheme theme) { GameObject item1 = ChartHelper.AddObject("item" + i, parent, anchorMin, anchorMax, v2_0_05, Vector3.zero); var item = new TooltipViewItem(); item.gameObject = item1; item.columns.Add(CreateViewItemColumn(0, item1.transform, tooltip, theme)); item.columns.Add(CreateViewItemColumn(1, item1.transform, tooltip, theme)); item.columns.Add(CreateViewItemColumn(2, item1.transform, tooltip, theme)); return(item); }
private ChartLabel GetItemColumn(TooltipViewItem item, int i) { if (i < 0) { i = 0; } if (i < item.columns.Count) { return(item.columns[i]); } else { var column = CreateViewItemColumn(i, item.gameObject.transform, tooltip, theme); item.columns.Add(column); return(column); } }