Version

Drill Property

Appearance of the hierarchical Drill Down chart behavior.
Syntax
'Declaration
 
Public ReadOnly Property Drill As DrillDownAppearance
public DrillDownAppearance Drill {get;}
Remarks

This property exposes the Infragistics.UltraChart.Resources.Appearance.DrillDownAppearance to the UltraWebChart control, allowing the developer to set properties related to UltraWebChart's drill down behavior at run-time (defining drill down hierarchies in the design-time environment is unsupported.)

Example
' 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
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, 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

See Also