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

XAxis Clicked, and send parameter????

1 Answer 23 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Adler
Top achievements
Rank 1
Adler asked on 12 Nov 2015, 04:19 PM

Hello,

I was looking this post above, and was near that i need.... but i need send return of clicked to function C# to show in ToolTip.

Can help?

 http://www.telerik.com/forums/make-xaxis-labels-clickable-links-in-bar-chart#syNAWhndc0a7av9UEqqSng

 

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script>
            function pageLoad() {
                    var chart = $find("<%=RadHtmlChart5_3.ClientID%>");
            chart._chartObject.bind("axisLabelClick", chart_axisLabelClick);
            }
            function chart_axisLabelClick(e) {
                //alert(e.value);
                TestCodeBehind(e.value);
                var oWnd = $find("<%= RadToolTip.ClientID %>");
                oWnd.show();
            }

            function TestCodeBehind(valor) {


               // __doPostBack('SetSessionVariable', valor);

    
                document.getElementById('<%= RadToolTip.ClientID %>').innerHTML = '<%= CodeBehind() %>';

                return false;
            }

        </script>
    </telerik:RadCodeBlock>

 

    protected string CodeBehind(string valor)
    {

        //string eventTarget = (this.Request["__EVENTTARGET"] == null) ? string.Empty : this.Request["__EVENTTARGET"];
        //string eventArgument = (this.Request["__EVENTARGUMENT"] == null) ? string.Empty : this.Request["__EVENTARGUMENT"];

        //if (eventTarget == "SetSessionVariable")
        //{
        //    if (eventArgument == "1")
        //    {
        //        return "Aleluia";
        //    }
        //}

        if (Label1.Text == "1")
        {
            return "Aleluia";
        }
         else
        {
            return "Error";
        }

    }

 

 

  <td>
                                            <asp:Label ID="Label1" runat="server" Visible="true" Text=""></asp:Label>
                                            <asp:Label ID="lbl" runat="server" Visible="true" Text=""></asp:Label>
                                            <telerik:RadToolTip ID="RadToolTip" runat="server" TargetControlID="lbl"
                                                Width="200px" RelativeTo="Element" Position="TopCenter"  AutoCloseDelay="5000">
                                                       teste  
                                            </telerik:RadToolTip>
                                            <telerik:RadHtmlChart runat="server" ID="RadHtmlChart5_3" Width="350px" Visible="false" Skin="Silk" Height="300px" Transitions="true" OnDataBound="RadHtmlChart5_3_DataBound">
                                                <PlotArea>
                                                    <Series>
                                                        <telerik:RadarLineSeries Name="Avaliação do Docente" DataFieldY="media_docente" MissingValues="Gap">
                                                            <Appearance>
                                                                <FillStyle BackgroundColor="#00adcc"></FillStyle>
                                                            </Appearance>
                                                            <LabelsAppearance Visible="false">
                                                            </LabelsAppearance>
                                                            <LineAppearance Width="2" />
                                                            <MarkersAppearance Visible="false"></MarkersAppearance>
                                                        </telerik:RadarLineSeries>
                                                    </Series>
                                                    <Series>
                                                        <telerik:RadarLineSeries Name="Media Geral da Questão" DataFieldY="media_geral" MissingValues="Gap">
                                                            <Appearance>
                                                                <FillStyle BackgroundColor="Red"></FillStyle>
                                                            </Appearance>
                                                            <LabelsAppearance Visible="false">
                                                            </LabelsAppearance>
                                                            <LineAppearance Width="2" />
                                                            <MarkersAppearance Visible="false"></MarkersAppearance>
                                                        </telerik:RadarLineSeries>
                                                    </Series>
                                                    <XAxis DataLabelsField="nr_pergunta"   Color="Black" Reversed="true" StartAngle="90">
                                                        <MinorGridLines Visible="true"></MinorGridLines>
                                                        <MajorGridLines Visible="true" Color="#EFEFEF" Width="1"></MajorGridLines>
                                                    </XAxis>
                                                    <YAxis MinValue="0" MaxValue="100" Step="25" Visible="true" Color="Black" MajorTickType="Outside" Reversed="true">
                                                        <MinorGridLines Visible="true"></MinorGridLines>
                                                        <MajorGridLines Visible="true" Color="#EFEFEF" Width="1"></MajorGridLines>
                                                    </YAxis>
                                                </PlotArea>
                                                <ChartTitle Text="">
                                                    <Appearance Align="Center" BackgroundColor="White" Position="Top">
                                                    </Appearance>
                                                </ChartTitle>
                                                <Legend>
                                                    <Appearance Visible="true" Position="Bottom" BackgroundColor="White">
                                                    </Appearance>
                                                </Legend>
                                            </telerik:RadHtmlChart>
                                            <asp:ObjectDataSource ID="odsTab5_3" runat="server" OnSelecting="odsTab5_3_Selecting" SelectMethod="listRadarDocente"

TypeName="T_Quest.Data.F_Resposta_Questao_Docente_Vertical">
                                                <SelectParameters>
                                                    <asp:Parameter Name="IdEdicao" Type="Int32" />
                                                    <asp:Parameter Name="IdDocente" Type="Int32" />
                                                </SelectParameters>
                                            </asp:ObjectDataSource>

                                        </td>                        
​​​

1 Answer, 1 is accepted

Sort by
0
Adler
Top achievements
Rank 1
answered on 12 Nov 2015, 04:20 PM
I cant send by postback..... because i need show tooltip return of click....
Tags
Chart (HTML5)
Asked by
Adler
Top achievements
Rank 1
Answers by
Adler
Top achievements
Rank 1
Share this question
or