Telerik Forums
Kendo UI for jQuery Forum
4 answers
51 views
I created a column sparkline as such:

@(Html.Kendo().Sparkline()
    .Name("Minutes")
    .ChartArea(c => c.Height(100))
    .DataSource(ds => ds
       .Read(read => read.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "UtilizationCall30Day" })).Type(HttpVerbs.Get))
    )
    .Series(series => series
       .Column("SecondCount").Color("#00ADEE")
    )
 )

Is there a way I can pass in a javascript function to convert the values from seconds to minutes?
Iliana Dyankova
Telerik team
 answered on 22 Jan 2015
1 answer
52 views

 I made an upgraded with the official release (v. 2014.3.1119) .
 
I had a new issue with hideColumn() method of grid, which I've solved applying the latest internal build v.2014.3.1308.
 I've found the solution in this thread: http://www.telerik.com/forums/grid-hidecolumn-method-while-the-grid-is-not-shown.

A new issue is raised since I have included the latest internal build v.2014.3.1308.
A defect is preventing the sparkline tooltips from showing. Sometimes I get the error message "Uncaught TypeError: Cannot set property 'categoryPoints' of undefined".


T. Tsonev
Telerik team
 answered on 15 Jan 2015
2 answers
332 views
Hello,

I have a Kendo grid connected to a DataSource. One of the data members of the DataSource is an array of integers and I'd like to set them in a grid cell in the row for the entity as a SparkLine.

<div id="otdQaGrid"></div>
 
<!-- JavaScript -->
 
$(document).ready(function () {
  dash.grid = $("#otdQaGrid").kendoGrid({
    dataSource: {
      type: "json",
      transport: {
        read: {
          url: "/api/GetOtdAndQuality",
        }
      }
    },
    columns: [{
    field: "CustomerName",
    title: "Customer",
    width: 200
  }, {
    field: "QualityAverage",
    title: "Avg. Quality"
  }, {
    field: "OtdAverage",
    title: "Avg. OTD"
  }, {
    field: "TotalParts",
    title: "# of Parts",
    width: 150
  }, {
    field: "MeetsOtd",
    title: "MeetsOtd"
  }, {
    field: "YtdQuality",
    title: "YTD Quality",
    template: "<span class='inlinespark'>#: YtdQuality #</span>"
  }],
    height: 550,
    dataBound: function (e) {
    }
  });
});
 

You can see the 'YtdQuality' field. This is the array of integers. I'd like to make this array of 12 integers be the datasource for the SparkLine in each column. 

Any idea on how to do this? I tried to make it a SparkLine in the dataBound function, but I was getting an error about the HTML template not working correctly. Without the function there it simply puts [Object object] in the cell for YtdQuality.
Petur Subev
Telerik team
 answered on 04 Dec 2014
2 answers
106 views
Hi,

When using charts, I use the "redraw" method to handle the case when the screen is resized by attaching a listener to the resize event. However, I realized that there is no such method in Sparklines, and I cannot find any good alternative (refresh seems to need me to resubmit the whole data, which is not as easy in my use case).

Do you plan to add this method too? :)
Michaël
Top achievements
Rank 1
 answered on 20 Nov 2014
1 answer
101 views
I'm trying to use a sparkline pie chart, and it's not obeying the height restrictions imposed upon it.  It renders at the correct width, but not the correct height.  I considered other styles causing a conflict, but I've declared the CSS inline, which should beat out any styles specified elsewhere.

What am I missing?

<div kendo-sparkline style="width: 20px; line-height: 20px; display: inline-block; height: 20px;"
     k-series="[{
          type: 'pie',
          data: [8,16],
      }]">
</div>

Attached is the rendered html.  As you can see, the inner span is set to a width of 100px instead of the 20px it should have.
Iliana Dyankova
Telerik team
 answered on 31 Oct 2014
4 answers
212 views
Using Kendo MVC 2014.1.318.440

I am trying to use sparklines for charting purposes, but I need to set the width of them. In Firefox and IE setting the width works fine, but in chrome I can't figure out why the same code isn't working.

Attached images.

Code:
@(Html.Kendo().Sparkline()
                                .Name("temp-range")
                                .Type(SparklineType.Bullet).SeriesColors("#ffb401")
                                .ChartArea(ca => ca.Background("#f6f6f6"))
                                .ValueAxis(axis => axis
                                .Numeric()
                                .Min(0)
                                .Labels(labels =>
                                labels.Background("#ffb401"))
                                .Max(100)
                                .Line(line => line.Visible(false)
                                ).Color("#ffb401")
                                )
                                .Tooltip(tooltip => tooltip
                                .Visible(false)
                                )
                                .HtmlAttributes(new { style = "width: 20px" })
                                .Data(new double[] { ViewBag.leftPanel["Score"], ViewBag.leftPanel["benchmark"] }))
T. Tsonev
Telerik team
 answered on 24 Jul 2014
1 answer
107 views
Hi,
I have duplicated the angular js example from telerik's website (http://demos.telerik.com/kendo-ui/sparklines/angular), but I am having some trouble rendering the chart. At times it will render correctly, whereas at other times the width and height seem to be way off.

Here is my code:
module.controller('TestController', ['$scope', '$timeout', function ($scope, $timeout) {
            $scope.weather = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "test_json/weather.json",
                        dataType: "json"
                    }
                }
            });
        }])

<div data-kendo-sparkline
                                 data-k-series="[{
                                   type: 'column',
                                   field: 'TMax',
                                   color: '#ff0000',
                                   negativeColor: '#0099ff'
                                 }]"
                                 data-k-tooltip="{ visible: false, shared: false }"
                                 data-k-data-source="weather"
                                 data-k-chart-area="{ background: 'transparent' }"
                                 style="height:50px;"></div>

Any ideas why sometimes it will be ok, whereas other times it will not, and this happens in Chrome, FF and IE.

Thanks,

T. Tsonev
Telerik team
 answered on 18 Jul 2014
1 answer
114 views
Hello, I use sparklines in the majority of the applications I help support.  I'm currently working on a project where I need to append a date to the existing sparkline data point tooltip.  I would like to avoid having to change the data source to include the dates unless that is the only way to make it work.

The series that the sparkline uses looks like this: ["12345, 12345, 12345, 12345, 12345, 12345"].  What I'm trying to do is actually append a date to each of the six values in the current array.  The goal is to have the tooltip that has a date above the data for each data point.  

Is this possible to do with Sparklines?

Thanks!
David
Top achievements
Rank 1
 answered on 18 Jun 2014
4 answers
161 views
I'm trying to find the right settings to get a Bar Sparkline to fill a div with just the bar image and no padding, white space or anything else around it. I've set the following, which gets close, but clips some of the image. Is there a way to do this?

<div id="files-format-chart" style="width:1120px;line-height:30px;cursor: pointer;"></div>

$("#files-format-chart").kendoSparkline({
    type: "bar",
    chartArea: {
        opacity: 0,
        margin: 0
    },
    plotArea: {
        opacity: 0,
        margin: 0
    },
    series: /*array of series*/,
    valueAxis: {
        max: /*max value of series data to avoid space*/
    }
});




Josh
Top achievements
Rank 1
 answered on 28 May 2014
1 answer
66 views
I can't seem to find the right configuration to display notes in a Bar type Sparkline. What I would like is to have them displayed below the stacked bar series. Is this possible?
Josh
Top achievements
Rank 1
 answered on 23 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?