on Click event bargrpah generate another graph

9 posts, 0 answers
  1. Mukul
    Mukul avatar
    12 posts
    Member since:
    Jan 2015

    Posted 08 Jul 2015 Link to this post

    Hi,

    I want to generate another graph on click event of bar for detail view .I saw the demo for the drill down chart but it basically based ajaxmanger and i am working in DNN in user control which is not supported so please tell me any solution thanks in advanced .

    thanks

    Mukul

  2. Mukul
    Mukul avatar
    12 posts
    Member since:
    Jan 2015

    Posted 08 Jul 2015 in reply to Mukul Link to this post

    Hi,

    its urgent please reply anyone...telerik team

    thanks

    Mukul

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 10 Jul 2015 Link to this post

    Hi Mukul,

    If you want to create the chart programmatically you can refer to this example - http://demos.telerik.com/aspnet-ajax/htmlchart/examples/serversideapi/programmaticcreation/defaultcs.aspx

    If you want, however, to data-bind the chart you can examine our data-binding demo section.

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Mukul
    Mukul avatar
    12 posts
    Member since:
    Jan 2015

    Posted 10 Jul 2015 in reply to Danail Vasilev Link to this post

    Hi Danail,

    Thanks for your response,but i want to generate another graph on click event  on bar of exiting graph. I saw the only OnClientSeriesClick event is supported by multiple-y axis bar graph so how to generate graph or Is it possible to generate another graph on click event

    Basically my first graph is on summary view and  generated graph will be detail view for each bar.

    thanks

    Mukul

     

  6. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 15 Jul 2015 Link to this post

    Hi Mukul,

    You can find below a simplified example of the mentioned scenario:

    ASPX:
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script>
                function OnSeriesClick(args) {
                    var radAM = $find("<%=RadAjaxManager1.ClientID%>");
                    radAM.ajaxRequest();
     
                }
            </script>
        </telerik:RadCodeBlock>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Panel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <asp:Panel ID="Panel1" runat="server">
            <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="600" Height="400">
                <ClientEvents OnSeriesClick="OnSeriesClick" />
                <PlotArea>
                    <Series>
                        <telerik:ColumnSeries Name="Series 1">
                            <SeriesItems>
                                <telerik:CategorySeriesItem Y="30" />
                                <telerik:CategorySeriesItem Y="10" />
                                <telerik:CategorySeriesItem Y="20" />
                            </SeriesItems>
                        </telerik:ColumnSeries>
                    </Series>
                    <XAxis>
                        <LabelsAppearance RotationAngle="33"></LabelsAppearance>
                        <Items>
                            <telerik:AxisItem LabelText="Item 1" />
                            <telerik:AxisItem LabelText="Item 2" />
                            <telerik:AxisItem LabelText="Item 3" />
                        </Items>
                    </XAxis>
                </PlotArea>
            </telerik:RadHtmlChart>
            <asp:Panel ID="Panel2" runat="server"></asp:Panel>
        </asp:Panel>
    </form>

    C#:
    protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        RadHtmlChart chart = new RadHtmlChart();
        chart.ID = "chart2";
        ColumnSeries cs = new ColumnSeries();
        CategorySeriesItem csi = new CategorySeriesItem() { Y = 10 };
        cs.SeriesItems.Add(csi);
        chart.PlotArea.Series.Add(cs);
        Panel2.Controls.Add(chart);
    }

    You can modify it further as per your requirements.

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Mukul
    Mukul avatar
    12 posts
    Member since:
    Jan 2015

    Posted 15 Jul 2015 in reply to Danail Vasilev Link to this post

    Hi Danail,

    I am applying your code as per suggestion,but its give an error  "Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error."

    When i commented the <telerik:AjaxUpdatedControl ControlID="Panel1" /> ,then error disappear .

    i am currently using user control in DNN..so  help me out to resolve my issue

    thanks in advanced to give your time

    Mukul

  8. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 17 Jul 2015 Link to this post

    Hi Mukul,

    DNN is not officially supported by Telerik UI for ASP.NET AJAX controls and we cannot guarantee whether such an integration will work flawlessly because it hasn't been gone through a full QA process.

    That being said if you encounter an issue with the control you should isolate the issue in a non-DNN environment and then send it back to us, so that we can investigate it and provide a solution if possible.

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Mukul
    Mukul avatar
    12 posts
    Member since:
    Jan 2015

    Posted 17 Jul 2015 in reply to Danail Vasilev Link to this post

    Hi Danail,

    Is it any other way to fire ClientSeriesclick event in javascript by bind chart with server side method like __dopostback method or any other option.

    Give me your suggestion.   if any possible option.

    Thanks

    Mukul

  10. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 21 Jul 2015 Link to this post

    Hello Mukul,

    I am not quite sure whether I fully understand your requirement. You can, however, find useful my comments below:
        - You can handle client-side events from the markup and code behind. You can use the same property and tag names from the markup in the code behind as well.
        - It is fine to bind a programmatically created chart. This can also be done on the server after calling the __doPostBack method.
        - You can register a JavaScript from the code behind - http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/opening-from-the-server
       
    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017