Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Tool Tip Complications in RadHtmlChart

$
0
0
 

Thanx Danail,

I made it,just one issue is this upon one drop down selected other then ALL condition.My toolTip display (Total Usage:some value) but if I need to define proper label for Tooltip which is different as like same dropdown selected text .For example ,if I select Data in dropdown ,I wanted to display in tooltip .(Data=somevalue) else for all I had made changes and attached my code.Just look in to it and convey some solution.

Regards,

Shikhar

 

 

 

 

<telerik:RadHtmlChart ID="RadHtmlChart2"Skin="Glow"runat="server"Width="1500"
                        Height="500">
                        <PlotArea>
                            <Series>
                                <telerik:LineSeries Name="Usages"DataFieldY="CostOnData">
                                    <TooltipsAppearance Color="White"DataFormatString="{N}">
                                    </TooltipsAppearance>
                                    <LabelsAppearance Visible="false">
                                        <ClientTemplate>
                            #=dataItem.CostOnData#
                                        </ClientTemplate>
                                    </LabelsAppearance>
                                    <TooltipsAppearance Color="White">
                                        <ClientTemplate>
                          
                             #if(dataItem.CostOnData > 0) {# Total Usage:#=dataItem.CostOnData# #}else {##} #<br \>
                             #if(dataItem.SumofSMS > 0) {# SMS: #=dataItem.SumofSMS#  #} else {#  #} #<br \>
                            #if(dataItem.SUMOFVOICE > 0) {# Voice: #=dataItem.SUMOFVOICE# #} else {##} #<br \>
                            #if(dataItem.SumofDATA > 0) {# DATA: #=dataItem.SumofDATA# #} else {##} #<br \>
                            #if(dataItem.SumofMMS > 0) {# MMS: #=dataItem.SumofMMS# #} else {##} #
                            
                                        </ClientTemplate>
                                    </TooltipsAppearance>
                                </telerik:LineSeries>
                            </Series>
                            <XAxis DataLabelsField="BetweenDate"StartAngle="0">
                                <LabelsAppearance RotationAngle="35">
                                </LabelsAppearance>
                                <TitleAppearance Position="Center"RotationAngle="0"Text="Usage Dates"/>
                            </XAxis>
                            <YAxis>
                                <LabelsAppearance />
                                <TitleAppearance Position="Center"RotationAngle="0"Text="Cost"/>
                            </YAxis>
                        </PlotArea>
                        <Legend>
                            <Appearance Visible="true"/>
                        </Legend>
                        <ChartTitle Text="30 days Usage Summary - Billed Calls">
                            <Appearance>
                                <TextStyle Color="White"FontSize="15"FontFamily="Ariel"Margin="10"Padding="20"/>
                            </Appearance>
                        </ChartTitle>
                    </telerik:RadHtmlChart>
[quote]Danail Vasilev said:Hello Shikhar,

I can suggest that you try one of the following things:
    - Use JavaScript inside the tooltip template to specify the particular tooltip based on some condition (e.g., if or switch statement) - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/clienttemplate/display-html-and-execute-javascript
    - Define the template for the series on the client-side, after the interaction with the dropdown:
<script>
    function pageLoad() {
        var chart = $find("<%=RadHtmlChart1.ClientID%>");
        chart.get_kendoWidget().options.series[0].tooltips.template = "#if(value > 20) {# Value #=value# is a good option#} else {# value below 20 is a bad option #}#";
        chart.repaint();
    }
</script>


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
[/quote][quote]Danail Vasilev said:Hello Shikhar,

I can suggest that you try one of the following things:
    - Use JavaScript inside the tooltip template to specify the particular tooltip based on some condition (e.g., if or switch statement) - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/clienttemplate/display-html-and-execute-javascript
    - Define the template for the series on the client-side, after the interaction with the dropdown:
<script>
    function pageLoad() {
        var chart = $find("<%=RadHtmlChart1.ClientID%>");
        chart.get_kendoWidget().options.series[0].tooltips.template = "#if(value > 20) {# Value #=value# is a good option#} else {# value below 20 is a bad option #}#";
        chart.repaint();
    }
</script>


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
[/quote]

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>