'Declaration Public ReadOnly Property Drill As DrillDownAppearance
public DrillDownAppearance Drill {get;}
This property exposes the Infragistics.UltraChart.Resources.Appearance.DrillDownAppearance to the UltraWinChart control, allowing the developer to set properties related to UltraWinChart's drill down behavior at run-time (defining drill down behavior at design-time is unsupported.)
' initialize DrillElement UltraChart1.Drill.Enabled = True UltraChart1.Drill.DrillElements = New DrillElement() {New DrillElement} UltraChart1.Drill.DrillElements(0).DrillDown = New MyDrillDown(UltraChart1) ' ... Private Sub UltraChart1_ChartDataClicked(ByVal sender As Object, ByVal e As Infragistics.UltraChart.Shared.Events.ChartDataEventArgs) Handles UltraChart1.ChartDataClicked Dim childTable As DataTable = chartData.Tables("Child") UltraChart1.Drill.DrillElements(0).DrillDown.Drill(e.DataRow, e.DataColumn, ChartType.LineChart, childTable) End Sub ' ... Friend Class MyDrillDown Implements IDrillDown Private myChart As UltraChart Public Sub New(ByVal chart As UltraChart) myChart = chart End Sub Public Sub Drill(ByVal row As Integer, ByVal column As Integer, ByVal chartType As Infragistics.UltraChart.Shared.Styles.ChartType, ByVal dataSource As Object) Implements Infragistics.UltraChart.Resources.IDrillDown.Drill ' implement Drill-Down behavior / initialize child chart myChart.ChartType = chartType myChart.Drill.Enabled = False myChart.Data.DataSource = dataSource myChart.Data.IncludeColumn(0, False) myChart.Data.IncludeColumn(1, False) myChart.Data.DataBind() End Sub End Class
// initialize a DrillElement UltraChart1.Drill.Enabled = true; UltraChart1.Drill.DrillElements = new DrillElement[] {new DrillElement()}; UltraChart1.Drill.DrillElements[0].DrillDown = new MyDrillDown(UltraChart1); // ... private void UltraChart1_ChartDataClicked(object sender, ChartDataEventArgs e) { // initiate custom Drill-Down DataTable childTable = chartData.Tables["Child"]; UltraChart1.Drill.DrillElements[0].DrillDown.Drill(e.DataRow, e.DataColumn, ChartType.LineChart, childTable); } // ... internal class MyDrillDown : IDrillDown { private UltraChart myChart; public MyDrillDown(UltraChart chart) { myChart = chart; } #region IDrillDown Members void Infragistics.UltraChart.Resources.IDrillDown.Drill(int row, int column, Infragistics.UltraChart.Shared.Styles.ChartType chartType, object dataSource) { // implement Drill-Down behavior / initialize child chart myChart.ChartType = chartType; myChart.Drill.Enabled = false; myChart.Data.DataSource = dataSource; myChart.Data.IncludeColumn(0, false); myChart.Data.IncludeColumn(1, false); myChart.Data.DataBind(); } #endregion }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2