Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
creating a dynamic drilldown
posted

I am dyanmically creating a chart with the following code.  The chart is being created and rendered at run-time so there is no static object on any aspx page or form.  I would now like to add a drill down to the bars but can't figure out how to create it dynamically considering all the examples show use of the object's click event.  What options do I have.  here is the current charting code:

 UltraChart ultraChart1 = new UltraChart();

ultraChart1.ID = "UltraChart1";

DataTable mydata = new DataTable();mydata.Columns.Add("Label", typeof(string));

mydata.Columns.Add("OnPeak", typeof(double));

mydata.Columns.Add("OffPeak", typeof(double));

mydata.Rows.Add(new object[ {"Sat 3/1/2008",34,12});

mydata.Rows.Add(new object[ { "Sat 3/2/2008", 27, 8 });

mydata.Rows.Add(new object[ { "Sat 3/3/2008", 26, 9 });

System.IO.StringWriter stringWriter = new System.IO.StringWriter();HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);

ultraChart1.Width = 650;

ultraChart1.Height = 400;

ultraChart1.Border.CornerRadius = 10;

ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.StackColumnChart;

ultraChart1.ColorModel.ModelStyle = ColorModels.CustomLinear;

ultraChart1.ColorModel.CustomPalette = new System.Drawing.Color[ { ApsOrange,ApsBlue };ultraChart1.Effects.Add(new Infragistics.UltraChart.Resources.Appearance.GradientEffect());

ultraChart1.DataSource = mydata;

ultraChart1.Data.DataBind();

ultraChart1.RenderControl(htmlWriter);

return stringWriter.ToString();

Parents
  • 28496
    Offline posted

    if you're unable to add a server-side event handler, you can always handle the client-side click event.  the simplest drill-down scenario using client-side code would probably be to change the url using window.open or window.location.href, appending the current row and column numbers into a querystring. 

Reply Children
No Data