Column sparkline from string "1,1,1,-1,-1,-1,1,1"

2 posts, 0 answers
  1. Morten
    Morten avatar
    331 posts
    Member since:
    Jul 2012

    Posted 23 Aug Link to this post

    Hi

    in a kendo grid column I'm trying to render column sparklines from this markup:

    <span class="compliance-dev" data-source="-1,-1,-1,1,1,-1,-1,-1"></span>

    in grid.dataBound I do this:

    var $spans = $(".compliance-dev", "#grid");

                $.each($spans, function() {
                    var $span = $(this);
                    var ds = $span.data("source").split(',');
                    $span.kendoSparkline({
                        data: ds,
                        //series: [{
                        //    type: "column",
                        //    color: "#ff0000",
                        //    negativeColor: "#0099ff"
                        //}]
                    });
                });

    This renders into a sparkline of type line: https://dojo.telerik.com/UsUluTaK

    How do I render the sparkline as a column graph?

    /Morten

  2. Daniel
    Admin
    Daniel avatar
    2209 posts

    Posted 28 Aug Link to this post

    Hello,

    You can use the type option - updated example.

    Regards,
    Daniel
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top