"Stacked bar chart Tooltip -- Single Bar of multi Stacks should show all color with value on tooltip"

9 posts, 1 answers
  1. Nilesh
    Nilesh avatar
    7 posts
    Member since:
    Apr 2015

    Posted 06 Oct 2015 Link to this post

    "Stacked bar chart Tooltip -- Single Bar of multi Stacks should show all color with value on tooltip"
  2. Answer
    Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 08 Oct 2015 Link to this post

    Hello,

    You can use shared toolitp to show all values. The colors will not be shown by default but it is possible to use template in order to show them(live demo).

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Nilesh
    Nilesh avatar
    7 posts
    Member since:
    Apr 2015

    Posted 08 Oct 2015 in reply to Daniel Link to this post

    Thanks Daniel :)
  5. Nilesh
    Nilesh avatar
    7 posts
    Member since:
    Apr 2015

    Posted 02 Dec 2015 Link to this post

    Hi,

    One issue with sharedTooltip is, its showing area above the bars also, i want to show only on bars area.

     

     

  6. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 04 Dec 2015 Link to this post

    Hi Nilesh,

    I am afraid what you are trying to achieve is not supported and there is no a suitable workaround which I could suggest. Please accept my apologies for any inconvenience this may cause. 

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Peter
    Peter avatar
    35 posts
    Member since:
    May 2016

    Posted 19 Aug in reply to Daniel Link to this post

    Hi, 

    how can I 'translate' the Dojo to Kendo MVC?

    I want show at end the Total, It works in Dojo. in cshtml I insert

    <script type="text/kendo" id="sharedTemplate">
            <div>
                <table>
                    #var total=0
                    for (var i = 0; i < points.length; i++) { #
                    <tr>
                        <td>#:points[i].series.name#</td>
                        <td>#:points[i].value#</td>
                    </tr>
                    #total=total+points[i].value;} #
                    <tr>
                        <td>All:</td>
                        <td>#:total#</td>
                    </tr>
                </table>
            </div>
        </script>
     
     @(Html.Kendo().Chart<ChartDataViewModel>()
    ...
    .Tooltip(tooltip => tooltip.Visible(true).Shared(true).SharedTemplate("# $('\\\\#sharedTemplate').html() #"))

    Then the Tooltip is shown empty.

     

  8. Peter
    Peter avatar
    35 posts
    Member since:
    May 2016

    Posted 19 Aug in reply to Peter Link to this post

    I've got it working with a javascript function:

    <script>
        $(document).ready(function () {
            var chart = $("#chart").data("kendoChart");
            var options = chart.options;
            options.tooltip = {
                shared: true,
                visible: true,
                sharedTemplate: $("#sharedTemplate").html()
            }
            chart.setOptions(options);
        });
    </script>

    But what ist the correct Razor Syntax for

    .Tooltip(tooltip => tooltip.Visible(true).Shared(true).SharedTemplate("# $('\\\\#sharedTemplate').html() #"))

     

     

     

  9. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 23 Aug Link to this post

    Hello,

    The wrapper does not currently support setting external template. The template can only be set inline with the SharedTemplate method:
    .SharedTemplate(
        @"<div>
            <table>
            ...
            </table>
        </div>"
    )


    Regards,
    Daniel
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  10. Peter
    Peter avatar
    35 posts
    Member since:
    May 2016

    Posted 23 Aug in reply to Daniel Link to this post

    Thanks, Daniel.
    So I have to use the Javascript solution.

    Peter

Back to Top
Kendo UI is VS 2017 Ready