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

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

1 Answer 30 Views
Sparkline
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 23 Aug 2018, 10:00 AM

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

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 28 Aug 2018, 06:58 AM
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.
Tags
Sparkline
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Daniel
Telerik team
Share this question
or