This is a migrated thread and some comments may be shown as answers.

radhtml chart drill down not working after going down one level

5 Answers 140 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Sampath
Top achievements
Rank 1
Sampath asked on 09 Feb 2014, 02:54 PM
hi,

i have been following this example to build a chart with drill down functionality. 
https://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultcs.aspx

<div class="dashboard_div_doublewidth">
                        Business Unit Task Distribution
                            <telerik:RadCodeBlock ID="codeBlock" runat="server">
                                <script type="text/javascript">
                                    function OnClientSeriesClicked(sender, args) {
                                        if (args.get_seriesName() != "Users") $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(args.get_category());
                                    }
                                </script>
                            </telerik:RadCodeBlock>
                            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                                <AjaxSettings>
                                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                        <UpdatedControls>
                                            <telerik:AjaxUpdatedControl ControlID="RadHtmlChart4" LoadingPanelID="LoadingPanel1">
                                            </telerik:AjaxUpdatedControl>
                                        </UpdatedControls>
                                    </telerik:AjaxSetting>
                                    <telerik:AjaxSetting AjaxControlID="Refresh">
                                        <UpdatedControls>
                                            <telerik:AjaxUpdatedControl ControlID="RadHtmlChart4" LoadingPanelID="LoadingPanel1">
                                            </telerik:AjaxUpdatedControl>
                                        </UpdatedControls>
                                    </telerik:AjaxSetting>
                                </AjaxSettings>
                            </telerik:RadAjaxManager>
                            <telerik:RadHtmlChart ID="RadHtmlChart4" runat="server" DataSourceID="SqlDataSource_DrillDownL1"
                                OnClientSeriesClicked="OnClientSeriesClicked" Height="330px" Skin="Office2010Blue"
                                Width="750px">
                                <PlotArea>
                                    <Series>
                                        <telerik:ColumnSeries DataFieldY="TotalTasks" Name="TotalTasks">
                                            <TooltipsAppearance Color="White" />
                                        </telerik:ColumnSeries>
                                        <telerik:ColumnSeries DataFieldY="CompletedTasks" Name="CompletedTasks">
                                        </telerik:ColumnSeries>
                                        <telerik:ColumnSeries DataFieldY="IncompletedTasks" Name="IncompletedTasks">
                                        </telerik:ColumnSeries>
                                    </Series>
                                    <XAxis DataLabelsField="CBUName">
                                    </XAxis>
                                </PlotArea>
                            </telerik:RadHtmlChart>
                            <asp:SqlDataSource ID="SqlDataSource_DrillDownL1" runat="server" ConnectionString="<%$ ConnectionStrings:customerRelationshipIndexDB_FinalConnectionString %>"
                                SelectCommand="SELECT CBUName, SUM(TotalTasks) AS TotalTasks, SUM(CompletedTasks) AS CompletedTasks, SUM(TotalTasks) - SUM(CompletedTasks) AS IncompletedTasks FROM (SELECT CBUName, COUNT(TaskId) AS TotalTasks, 0 AS CompletedTasks FROM V_ContactsToBeCompleted WHERE (DueDate BETWEEN @start AND @end ) GROUP BY CBUName UNION SELECT CBUName, 0 AS TotalTasks, COUNT(TaskId) AS CompletedTasks FROM V_ContactsToBeCompleted AS V_ContactsToBeCompleted_1 WHERE (DueDate BETWEEN @start AND @end ) AND (IsTaskCompleted = 'true') GROUP BY CBUName) AS t GROUP BY CBUName">
                                <SelectParameters>
                                    <asp:Parameter Name="start" />
                                    <asp:Parameter Name="end" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <asp:HiddenField ID="HiddenField1" runat="server" />
                            <asp:SqlDataSource ID="SqlDataSource_DrillDownL2" runat="server" ConnectionString="<%$ ConnectionStrings:customerRelationshipIndexDB_FinalConnectionString %>"
                                SelectCommand="SELECT Brand, SUM(TotalTasks) AS Brand_TotalTasks, SUM(CompletedTasks) AS Brand_CompletedTasks, SUM(TotalTasks) - SUM(CompletedTasks) AS Brand_IncompletedTasks FROM (SELECT Brand, COUNT(TaskId) AS TotalTasks, 0 AS CompletedTasks FROM V_ContactsToBeCompleted WHERE (DueDate BETWEEN @start AND @end ) AND (CBUName = @cbu) GROUP BY Brand UNION SELECT Brand, 0 AS TotalTasks, COUNT(TaskId) AS CompletedTasks FROM V_ContactsToBeCompleted AS V_ContactsToBeCompleted_1 WHERE (DueDate BETWEEN @start AND @end ) AND (IsTaskCompleted = 'true') AND (CBUName = @cbu) GROUP BY Brand) AS t GROUP BY Brand">
                                <SelectParameters>
                                    <asp:Parameter Name="start" />
                                    <asp:Parameter Name="end" />
                                    <asp:Parameter Name="cbu" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <asp:HiddenField ID="HiddenField2" runat="server" />
                            <asp:SqlDataSource ID="SqlDataSource_DrillDownL3" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:customerRelationshipIndexDB_FinalConnectionString %>" 
                                SelectCommand="SELECT AccountName, SUM(TotalTasks) AS Account_TotalTasks, SUM(CompletedTasks) AS Account_CompletedTasks, SUM(TotalTasks) - SUM(CompletedTasks) AS Account_IncompletedTasks FROM (SELECT AccountName, COUNT(TaskId) AS TotalTasks, 0 AS CompletedTasks FROM V_ContactsToBeCompleted WHERE (DueDate BETWEEN @start AND @end ) AND (CBUName = @cbu) AND (Brand = @brand) GROUP BY AccountName UNION SELECT AccountName, 0 AS TotalTasks, COUNT(TaskId) AS CompletedTasks FROM V_ContactsToBeCompleted AS V_ContactsToBeCompleted_1 WHERE (DueDate BETWEEN @start AND @end ) AND (IsTaskCompleted = 'true') AND (CBUName = @cbu) AND (Brand = @brand) GROUP BY AccountName) AS t GROUP BY AccountName">
                                <SelectParameters>
                                    <asp:Parameter Name="start" />
                                    <asp:Parameter Name="end" />
                                    <asp:Parameter Name="cbu" />
                                    <asp:Parameter Name="brand" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" Height="77px" Width="113px" runat="server">
                            </telerik:RadAjaxLoadingPanel>
                            <br />
                        </div>

public void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        string seriesName = RadHtmlChart4.PlotArea.Series[0].Name;

        if (seriesName == "TotalTasks")
        {

            string cbu = e.Argument;
            HiddenField1.Value = cbu;
            SqlDataSource_DrillDownL2.SelectParameters[0].DefaultValue = GetStartDate();
            SqlDataSource_DrillDownL2.SelectParameters[1].DefaultValue = GetEndDate();
            SqlDataSource_DrillDownL2.SelectParameters[2].DefaultValue = cbu;
            RadHtmlChart4.PlotArea.XAxis.DataLabelsField = "Brand";
            RadHtmlChart4.PlotArea.Series[0].DataFieldY = "Brand_TotalTasks";
            RadHtmlChart4.PlotArea.Series[0].Name = "Brand_TotalTasks";
            RadHtmlChart4.PlotArea.Series[1].DataFieldY = "Brand_CompletedTasks";
            RadHtmlChart4.PlotArea.Series[1].Name = "Brand_CompletedTasks";
            RadHtmlChart4.PlotArea.Series[2].DataFieldY = "Brand_IncompletedTasks";
            RadHtmlChart4.PlotArea.Series[2].Name = "Brand_IncompletedTasks";
            RadHtmlChart4.DataSourceID = "SqlDataSource_DrillDownL2";
        }
        else
        {
            if (seriesName == "Brand_TotalTasks")
            {
                string brand = e.Argument;
                HiddenField2.Value = brand;
                SqlDataSource_DrillDownL3.SelectParameters[0].DefaultValue = GetStartDate();
                SqlDataSource_DrillDownL3.SelectParameters[1].DefaultValue = GetEndDate();
                SqlDataSource_DrillDownL3.SelectParameters[2].DefaultValue = HiddenField1.Value;
                SqlDataSource_DrillDownL3.SelectParameters[3].DefaultValue = brand;
                RadHtmlChart4.PlotArea.XAxis.DataLabelsField = "Brand";
                RadHtmlChart4.PlotArea.Series[0].DataFieldY = "Account_TotalTasks";
                RadHtmlChart4.PlotArea.Series[0].Name = "Account_TotalTasks";
                RadHtmlChart4.PlotArea.Series[1].DataFieldY = "Account_CompletedTasks";
                RadHtmlChart4.PlotArea.Series[1].Name = "Account_CompletedTasks";
                RadHtmlChart4.PlotArea.Series[2].DataFieldY = "Account_IncompletedTasks";
                RadHtmlChart4.PlotArea.Series[2].Name = "Account_IncompletedTasks";
                RadHtmlChart4.DataSourceID = "SqlDataSource_DrillDownL3";
            }
            else
            {
                if (seriesName == "Account_TotalTasks")
                {
                    string brand = e.Argument;
                    HiddenField2.Value = brand;
                    SqlDataSource_DrillDownL3.SelectParameters[0].DefaultValue = GetStartDate();
                    SqlDataSource_DrillDownL3.SelectParameters[1].DefaultValue = GetEndDate();
                    SqlDataSource_DrillDownL3.SelectParameters[2].DefaultValue = HiddenField1.Value;
                    SqlDataSource_DrillDownL3.SelectParameters[3].DefaultValue = brand;
                    RadHtmlChart4.PlotArea.XAxis.DataLabelsField = "Brand";
                    RadHtmlChart4.PlotArea.Series[0].DataFieldY = "Brand_TotalTasks";
                    RadHtmlChart4.PlotArea.Series[0].Name = "TotalTasks";
                    RadHtmlChart4.PlotArea.Series[1].DataFieldY = "Brand_CompletedTasks";
                    RadHtmlChart4.PlotArea.Series[1].Name = "CompletedTasks";
                    RadHtmlChart4.PlotArea.Series[2].DataFieldY = "Brand_IncompletedTasks";
                    RadHtmlChart4.PlotArea.Series[2].Name = "IncompletedTasks";
                    RadHtmlChart4.DataSourceID = "SqlDataSource_DrillDownL3";
                }
            }
        }
    }

this is my code... it's not fully completed but this is how it's supposed to be like. i want to drill my data in the following order starting from "Business Unit" -> "Brand" -> "Account" -> "User" 
for some reason i can only click and view 1 level of detail, that is i can go from "Business Unit" -> "Brand".
the chart doesn't allow me to click on columns that i see when "Brand" details are loaded. 
can you suggest a reason for that and a solution for me. Thank you. 

5 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 11 Feb 2014, 04:23 PM
Hello Sampath,

I have already replied to your ticket that was opened on the same question, so that I am pasting my answer here for the rest of the community:

I have tried to reproduce the mentioned issue but to no avail - the drill down is going through all the mentioned levels. You can watch the short video test and then tell me what I am missing. Since the provided sql data sources are not available I have created a sample DataTables that are binded on each drill-down.

What I can suggest is that you put a break point to the problematic part of the code where the data source of the chart is switched and debug. You can also check whether there are some JavaScript errors on your page that could break the proper functionality of the script controls on your page. If there are such errors they must be found and fixed.

If the above step, however, is not helpful I can suggest that you try to reproduce the issue with the attached VS example and then send it back to us, so that we can make an investigation locally.

In the future, please post only one thread per question, because this will keep the conversation concise and in one place, without duplicating content and effort.

Regards,
Danail Vasilev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Asutosh
Top achievements
Rank 1
answered on 20 Jun 2014, 04:39 AM
hi 
i have radhtml pie chart in my page
its drillable to radhtml stackbar chart
and that stack bar chart is drillable to another stack bar chart
in this i hide and show div of chart
now issue is that my pie chart is getting drill to stackbar chart but this stackbar chart is not drilling to another stackbar chart
default.aspx.cs
  public void load_first_graph(string where)//for aco
    {
        try
        {
            pie.Visible = true;
            stackbar.Visible = false;
            string where1 = check_user();
            if (!string.IsNullOrEmpty(where))
            {
                where1 = where1 + " and " + where;
            }
            ViewState["count_check"] = 0;
            ViewState["first_grp"] = "group";
            hdnfield_firstchartclick.Value = "group";
            DataTable table1 = new DataTable();
            int id = 1;
            table1 = _obj_360PatientPopulationProfiledal.Fetch_All_patient_data_For_AllD(where1, id);
            Active_patient_count_chart.DataSource = table1;
            Active_patient_count_chart.PlotArea.XAxis.DataLabelsField = "AcoId";
            Active_patient_count_chart.PlotArea.Series[0].DataFieldY = "CountBenehicNo";
            Active_patient_count_chart.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = "Active Patient Gender : " + "#= dataItem.Gender#" + ",</br> Total Count:" + "#= dataItem.CountBenehicNo#";

            // ViewState["Favorite_Query_Activepatientcount"] = "select CountBenehicNo=count(distinct ba.benehicno),ba.ACoId,Gender=case when SexCd=1 then 'M' else 'F' end from [dbo].[BeneficiaryAcoPhysicianRel] ba  inner join [dbo].[Beneficiary_Details] bd on ba.BenehicNo=bd.benehicno " + where1 + " group by ba.ACoId , case when SexCd=1 then 'M' else 'F' end order by AcoId";
            ViewState["Favorite_Query_Activepatientcount"] = "select DisplayData=count(distinct ba.benehicno),ba.ACoId as DisplayName,ba.Gender as [Group] from [dbo].[BeneficiaryAcoPhysicianRel] ba inner join [ACOData].[BeneCohortdata] bc on bc.benehicno=ba.benehicno " + where1 + " group by ba.ACoId , gender order by DisplayName"; ;
            ViewState["Favorite_ChartType_Activepatientcount"] = "PIE-STACKBARCHART";
         

        }
        catch (Exception ex)
        {
            throw ex;
        }

    }

    public string check_user()
    {
        string where = null;
        string user = null;

        if (Session["AcoManager"] != null)   // For AcoManager Login  
        {
            string acoid = Session["AcoManager"].ToString();
            user = "where ba.Acoid ='" + acoid + "'";

        }
        else if (Session["rolename"].ToString() == "ACOADMIN") // For Aco Login 
        {
            string acoid = Session["ACOid"].ToString();
            user = "where ba.Acoid ='" + acoid + "'";

        }
        else if (Session["rolename"].ToString() == "PHYSICIAN")  // for participents 
        {
            string parid = Session["ACOParID"].ToString();
            string query = "select ACOParNPI from [dbo].ACOParicipants where ACOPariD = '" + parid + "'";
            DataTable _dt = new DataTable();
            _dt = _objUser_Chart_FavoriteDAL.FetchAll(query);
            string acoparnpi = _dt.Rows[0]["ACOParNPI"].ToString();
            user = "where ba.ACOParNPI ='" + acoparnpi + "'";

        }
        else if (Session["rolename"].ToString() == "ACOPARTICIPANTSGROUP")  // for participents group
        {
            string grpname = Session["group_tinlegalbuisenessname"].ToString();


            user = "where TIN_LegalBusinessName ='" + grpname + "'";

        }
        else // For Idesigns 
        {

        }
        where = user;
        return where;
    }


protected void RadButton1_Click(object sender, EventArgs e)
{
        string st = RadButton1.CommandName;
        string filter = null;
        first_chart_drilldown(st, filter);
//Frequent_Hospitalizationsby_Participantsby_Month_Chart.ChartTitle.Text = "Passed argument: " + RadButton1.CommandName;
}
protected void RadButton2_Click(object sender, EventArgs e)
{
//Execute some server logic
System.Threading.Thread.Sleep(2000);
first_stack_bar_chart.ChartTitle.Text = "Passed argument: " + RadButton2.CommandName;
}

    public void first_chart_drilldown(string st_name, string where_filter)
    {
        string level_first = ViewState["first_grp"].ToString();
     
        switch (level_first)
        {
            case "group":
                ViewState["first_grp"] = null;
                ViewState["first_grp"] = "participant";
                hdnfield_firstchartclick.Value = "participant";

                pie.Visible = false;
                stackbar.Visible = true;
                

               
                //       img_save_as_image_first.OnClientClick = "getSvgContent_Active_patient_count2(this);";

                string st = Session["username"].ToString();

                string where = "where ba.ACOId =" + "'" + st + "'";

                if (!string.IsNullOrEmpty(where_filter))
                {
                    where = where + " and " + where_filter;
                }
                DataTable table = new DataTable();
                int id = 2;
                table = _obj_360PatientPopulationProfiledal.Fetch_All_patient_data_For_AllD(where, id);

                first_stack_bar_chart.OnClientSeriesClicked = "OnClientSeriesClicked_1";

                first_stack_bar_chart.Skin = "Silk";
                first_stack_bar_chart.PlotArea.XAxis.MajorGridLines.Visible = false;
                first_stack_bar_chart.PlotArea.XAxis.MinorGridLines.Visible = false;
                first_stack_bar_chart.PlotArea.YAxis.MajorGridLines.Visible = false;
                first_stack_bar_chart.PlotArea.YAxis.MinorGridLines.Visible = false;
                first_stack_bar_chart.Legend.Appearance.Visible = false;
                string displaydata = "CountBenehicNo";
                string groupname = "Gender";
                string displayname = "TIN_LegalBusinessName";
                first_stack_bar_chart.DataSource = getGroupedData(table, first_stack_bar_chart, groupname, displaydata, displayname);
                first_stack_bar_chart.DataBind();
             
              //  pnl_first.Controls.Add(first_stack_bar_chart);
                break;
            case "participant":
            

                st = null;
                if (Session["rolename"].ToString() == "ACOPARTICIPANTSGROUP")
                {
                    st = Session["group_tinlegalbuisenessname"].ToString();
                }
                else
                {
                    st = st_name;
                }
                where = "where TIN_LegalBusinessName =" + "'" + st + "'";
                if (!string.IsNullOrEmpty(where_filter))
                {
                    where = where + " and " + where_filter;
                }
                DataTable table_2 = new DataTable();
                id = 3;
                table_2 = _obj_360PatientPopulationProfiledal.Fetch_All_patient_data_For_AllD(where, id);

                RadHtmlChart1.OnClientSeriesClicked = "OnClientSeriesClicked_1";

                RadHtmlChart1.Skin = "Silk";
                RadHtmlChart1.PlotArea.XAxis.MajorGridLines.Visible = false;
                RadHtmlChart1.PlotArea.XAxis.MinorGridLines.Visible = false;
                RadHtmlChart1.PlotArea.YAxis.MajorGridLines.Visible = false;
                RadHtmlChart1.PlotArea.YAxis.MinorGridLines.Visible = false;
                RadHtmlChart1.Legend.Appearance.Visible = false;
                displaydata = "CountBenehicNo";
                groupname = "Gender";
                displayname = "ACOParName";
                RadHtmlChart1.DataSource = getGroupedData(table_2, first_stack_bar_chart, groupname, displaydata, displayname);
                RadHtmlChart1.DataBind();
             
              //  pnl_first.Controls.Add(first_stack_bar_chart);
                ViewState["first_grp"] = "none";
                hdnfield_firstchartclick.Value = "none";
                    pie.Visible = false;
                stackbar.Visible = false;
                Div1.Visible = true;
                break;

        }
        //   updfirst.Update();
       

    }

    protected void setHtmlChartSeries(RadHtmlChart HtmlChart, int index, string grname, string display_data, string displayname)
    {
        try
        {
            string displaydata = display_data;
            string groupname = grname;
            string display_name = displayname;
            //["ClaimYearMonth"] ["ERVisits"]["Countbenehicno"]
            ColumnSeries columnSeries1 = new ColumnSeries();
            columnSeries1.DataFieldY = displaydata + index;
            // columnSeries1.AxisName = displayname + index;

            // columnSeries1.AxisName = "acoid" + index;
            //if (count == 2)
            //{
            //    columnSeries1.AxisName = "TIN_LegalBusinessName" + index;
            //    count = 0;
            //}
            columnSeries1.Stacked = true;
            columnSeries1.LabelsAppearance.Visible = false;
            columnSeries1.TooltipsAppearance.ClientTemplate = "#=dataItem." + groupname + index + "#<br /> Count : #=dataItem." + displaydata + index + "#<br />#=dataItem." + display_name + index + "#"; ;
            columnSeries1.LabelsAppearance.DataFormatString = "{0:N0}";
            HtmlChart.PlotArea.XAxis.DataLabelsField = display_name + index;
            HtmlChart.PlotArea.XAxis.LabelsAppearance.Visible = true;
            HtmlChart.PlotArea.Series.Add(columnSeries1);

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    protected DataTable getGroupedData(DataTable rowDataTable, RadHtmlChart chartname, string groupname, string displaydata, string displayname)
    {
        try
        {


            DataView dv = rowDataTable.DefaultView;

            //Get number of distinct rows by "Nationality" column
            DataTable distinctValues = dv.ToTable(true, groupname);
            int numDistinctValues = distinctValues.Rows.Count;

            //string user_type = null;
            //string where = null;
            //string whereForPopup = null;
            DataTable table = new DataTable();
            table = null;
            DataTable oldDT = rowDataTable;
            DataTable newDT = new DataTable();

            DataTable[] dtarr = new DataTable[numDistinctValues];

            for (int i = 0; i < numDistinctValues; i++)
            {
                //Split current datatable to multiple datatables
                dtarr[i] = oldDT.Select(groupname + "='" + distinctValues.Rows[i][0].ToString() + "'").CopyToDataTable();

                //Set g-th index to the columns of each g-th datatable
                for (int g = 0; g < dtarr[i].Columns.Count; g++)
                {
                    string columnName = dtarr[i].Columns[g].ColumnName + i;
                    dtarr[i].Columns[g].ColumnName = columnName;
                    //Add new columns to the new datasource
                    newDT.Columns.Add(columnName);
                }
            }

            //Add new rows to the datasource
            for (int i = 0; i < dtarr[0].Rows.Count; i++)
            {
                newDT.Rows.Add();
            }

            //Create a common datasource
            for (int i = 0; i < numDistinctValues; i++)
            {
                DataTable currDT = dtarr[i];

                //Set the RadHtmlChart settings

                setHtmlChartSeries(chartname, i, groupname, displaydata, displayname);

                //Loop through the columns of the current datatable
                for (int g = 0; g < currDT.Columns.Count; g++)
                {
                    //Loop through the rows of the current datatable
                    for (int f = 0; f < currDT.Rows.Count; f++)
                    {
                        string columnName = currDT.Columns[g].ColumnName;
                        newDT.Rows[f][columnName] = currDT.Rows[f][columnName];
                    }
                }
            }

            return newDT;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }


default.aspx
<form id="form1" runat="server">

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel7">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadButton1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pie" />
                         <telerik:AjaxUpdatedControl ControlID="stackbar" />
                         <telerik:AjaxUpdatedControl ControlID="Div1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadButton2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="first_stack_bar_chart" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function OnClientSeriesClicked_1(sender, args) {
                    var btn1 = $find("<%=RadButton1.ClientID%>");
                    btn1.set_commandName(args.get_category());
                    $find('<%= RadAjaxManager2.ClientID %>').ajaxRequestWithTarget("RadButton1", "");

                }
                function OnClientSeriesClicked_2(sender, args) {
                    var btn2 = $find("<%=RadButton2.ClientID%>");
                    btn2.set_commandName(args.get_category());
                    $find('<%= RadAjaxManager2.ClientID %>').ajaxRequestWithTarget("RadButton2", "");
                }
            </script>
        </telerik:RadCodeBlock>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel7" runat="server" Skin="Vista" Height="300" Width="500">
        </telerik:RadAjaxLoadingPanel>
        <div style="display: none;">
            <telerik:RadButton ID="RadButton1" runat="server" Text="Button1" OnClick="RadButton1_Click" />
            <telerik:RadButton ID="RadButton2" runat="server" Text="Button2" OnClick="RadButton2_Click" />
        </div>
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <div id="main">
                    <div id="pie" runat="server" visible="true">
                        <telerik:RadHtmlChart runat="server" ID="Active_patient_count_chart"
                            Height="235" Transitions="true" Style="margin-top: 5px;"
                            Skin="Silk" OnClientSeriesClicked="OnClientSeriesClicked_1" CssClass="abc">
                            <Appearance>
                                <FillStyle BackgroundColor="White"></FillStyle>
                            </Appearance>
                            <ChartTitle>
                            </ChartTitle>
                            <Legend>
                                <Appearance BackgroundColor="White" Position="Right" Visible="false">
                                </Appearance>
                            </Legend>
                            <PlotArea>
                                <Appearance>
                                    <FillStyle BackgroundColor="White"></FillStyle>
                                </Appearance>
                                <Series>
                                    <telerik:PieSeries StartAngle="120">
                                        <LabelsAppearance DataFormatString="{0}">
                                        </LabelsAppearance>
                                        <SeriesItems>
                                        </SeriesItems>
                                    </telerik:PieSeries>
                                </Series>
                            </PlotArea>
                        </telerik:RadHtmlChart>

                        <telerik:RadToolTipManager ID="RadToolTipManager9" runat="server" Skin="Telerik"
                            Width="200px" Animation="Slide" Position="TopCenter" EnableShadow="true" AutoTooltipify="false">
                        </telerik:RadToolTipManager>
                    </div>
                    <div id="stackbar" runat="server" visible="false">

                        <telerik:RadHtmlChart ID="first_stack_bar_chart" runat="server" Height="240" Skin="Silk" CssClass="abc">
                            <PlotArea>
                                <XAxis>
                                    <MajorGridLines Visible="false" />
                                    <MinorGridLines Visible="false" />
                                    <LabelsAppearance Visible="true" RotationAngle="-25">
                                        <TextStyle Color="black" FontFamily="verdana" Italic="false" FontSize="11" />
                                    </LabelsAppearance>

                                </XAxis>
                                <YAxis>
                                    <MajorGridLines Visible="false" />
                                    <MinorGridLines Visible="false" />
                                    <LabelsAppearance>
                                        <TextStyle Color="black" FontFamily="verdana" Italic="false" FontSize="11" />
                                    </LabelsAppearance>
                                </YAxis>
                            </PlotArea>
                        </telerik:RadHtmlChart>


                    </div>
                    <div id="Div1" runat="server" visible="false">

                        <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Height="240" Skin="Silk" CssClass="abc">
                            <PlotArea>
                                <XAxis>
                                    <MajorGridLines Visible="false" />
                                    <MinorGridLines Visible="false" />
                                    <LabelsAppearance Visible="true" RotationAngle="-25">
                                        <TextStyle Color="black" FontFamily="verdana" Italic="false" FontSize="11" />
                                    </LabelsAppearance>

                                </XAxis>
                                <YAxis>
                                    <MajorGridLines Visible="false" />
                                    <MinorGridLines Visible="false" />
                                    <LabelsAppearance>
                                        <TextStyle Color="black" FontFamily="verdana" Italic="false" FontSize="11" />
                                    </LabelsAppearance>
                                </YAxis>
                            </PlotArea>
                        </telerik:RadHtmlChart>


                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:HiddenField runat="server" ID="hdnfield_firstchartclick" />
    </form>





0
Danail Vasilev
Telerik team
answered on 24 Jun 2014, 10:52 AM
Hello Asutosh,

The provided VS example is not runnable due to missing dependents. What I can suggest is that you narrow down the issue to а small fully runnable example with few charts that are bound to a dummy data source (e.g., a DataTable) and then send it back to us, so that we can proceed further with the investigation.

Please note also that using RadAjaxPanel simultaneously with RadAjaxManager or UpdatePanel ( or implementing multiple wrapped RadAjaxPanels ) is not a supported scenario and we highly recommend to avoid such implementation. Please either use just the manager to update your controls replacing the UpdatePanel / RadAjaxPanel with a regular asp:Panel, or use the UpdatePanel / RadAjaxPanel alone to wrap your page.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Asutosh
Top achievements
Rank 1
answered on 17 Jul 2014, 10:07 AM
hi 
i am using radhtml stackbar chart
in that i have data with big diff 
i have aatached my data screenshot
so the problem is in my y axis it there step of 10,000
so small value is not show in stack
0
Danail Vasilev
Telerik team
answered on 17 Jul 2014, 10:31 AM
Hello,

This issue will be handled by the logarithmic axis mode of the y-axis. The feature will be available in Q3 2014. For the time being you can set the property through the chartObject, as illustrated in this feedback item.

Could I also ask you to open separate forum threads for different questions, so that forum threads can be found and tracked easier?

Thank you for your cooperation.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (Obsolete)
Asked by
Sampath
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Asutosh
Top achievements
Rank 1
Share this question
or