views:

4

answers:

0

I want to drill-down my MSchart with ASP.NET 4.0.

The main chart chtType was displayed successfully. I need to display the other chart Chart1.

Public mSeries1, mSeries2 As Series
Public mChartArea As ChartArea
Public ocmd As SqlCommand

Dim cnn As SqlConnection = New SqlConnection( "foo")

chtType.Series(0).PostBackValue = "#AXISLABEL"

Dim query As String = "SELECT d.name as department, COUNT(*) AS Amount  FROM foo"
ocmd = New SqlCommand(query, cnn)

cnn.Open()

chtType.DataSource = ocmd.ExecuteReader()
mSeries1 = New Series
mSeries1.XValueMember = "department"
mSeries1.YValueMembers = "Amount"
mSeries1.ToolTip = "#AXISLABEL= #PERCENT"
mChartArea = New ChartArea
mChartArea.AxisX.Interval = 1

Chart1.Series.Add(mSeries1)
Chart1.ChartAreas.Add(mChartArea)
Chart1.Series(0).PostBackValue = "#AXISLABEL"
Chart1.DataBind()

With this code, there is no reaction from the main chart. and the second chart (chart1) can't be viewed.

How can this be done?