How to make bars thicker in Kendo UI charts?


sony

enter image description here

My graph contains calorie vs time data. Calories have a value every 15 minutes. I want to pull the bar closer. I am posting a sample of the data along with a link to jsFiddle. Also, is it possible to display the entire 24 hours on the graph and only show the ones with values...

  var data=  [{"IntraDayFifteenMinuteActivityKey":443124,"id":"abcd","datetimedata":"7/20/2014 4:15:00 AM","caloriesOut":"17","distance":"0","elevation":"0","floors":"0","steps":"0","createddate":"7/20/2014 12:00:00 AM","distanceunit":"Km"},
    {"IntraDayFifteenMinuteActivityKey":443125,"id":"abcd","datetimedata":"7/20/2014 4:30:00 AM","caloriesOut":"20","distance":"0","elevation":"0","floors":"0","steps":"0","createddate":"7/20/2014 12:00:00 AM","distanceunit":"Km"},
{"IntraDayFifteenMinuteActivityKey":443126,"id":"abcd","datetimedata":"7/20/2014 4:45:00 AM","caloriesOut":"17","distance":"0","elevation":"0","floors":"0","steps":"0","createddate":"7/20/2014 12:00:00 AM","distanceunit":"Km"},
    {"IntraDayFifteenMinuteActivityKey":443127,"id":"abcd","datetimedata":"7/20/2014 5:00:00 AM","caloriesOut":"17","distance":"0","elevation":"0","floors":"0","steps":"0","createddate":"7/20/2014 12:00:00 AM","distanceunit":"Km"},
    {"IntraDayFifteenMinuteActivityKey":443128,"id":"abcd","datetimedata":"7/20/2014 5:15:00 AM","caloriesOut":"17","distance":"0.00442800018936396","elevation":"0","floors":"0","steps":"6","createddate":"7/20/2014 12:00:00 AM","distanceunit":"Km"},
    {"IntraDayFifteenMinuteActivityKey":443129,"id":"abcd","datetimedata":"7/20/2014 5:30:00 AM","caloriesOut":"17","distance":"0","elevation":"0","floors":"0","steps":"0","createddate":"7/20/2014 12:00:00 AM","distanceunit":"Km"}]




                    $("#IntraDayDataChart").kendoChart({
                        dataSource: data,
                        seriesColors: [color],
                        chartArea: {
                            background: ""
                        },

                        title: {
                            text: "Intraday Data",
                            font: "14px Arial,Helvetica,sans-serif bold"
                        },

                        legend: {
                            visible: false,
                        },

                        chartArea: {
                            background: ""
                        },

                        seriesDefaults: {
                            type: "column",
                            overlay: {
                                gradient: "none"
                            },
                            gap: .1
                        },
                        series: [{
                            name: type,
                            field: type
                        }],

                        categoryAxis: {
                            field: "datetimedata",                             
                            majorGridLines: {
                                visible: false
                            },
                            majorTicks: {
                            visible:false
                            },
                            type: "date",    
                            baseUnit: "minutes",
                            labels: {
                                dateFormats: {
                                    minutes: "h tt"
                                },
                                step:180
                            }                               
                        },
                        valueAxis: {
                            majorGridLines: {
                                visible: true
                            },
                            majorTicks: {
                                visible:false
                            },
                            labels: {
                                visible: false
                            },
                            title: {
                                text: type,
                                font: "14px Arial,Helvetica,sans-serif"
                            },
                            visible: false
                        },

                        tooltip: {
                            visible: true,
                            template: '#=kendo.toString(new Date(dataItem.datetimedata),"g")# <br />  #=kendo.toString(Number(dataItem.' + type + '),"n2")# ' + type
                        }
                    });
                }
            }

link to fiddle

Jonathan Buchanan

To make the chart lines thicker, you need to reduce the gaps in the series.

$("#chart").kendoChart({
  series: [ {
    gap: 0
  }]
});

Here is the API reference http://docs.telerik.com/kendo-ui/api/dataviz/chart#configuration-series.gap

They also have a tutorial on how to do this dynamically. http://demos.telerik.com/kendo-ui/bar-charts/gap-spacing


In order to display only times with data, you must define CategoryAxis as type "category", not type "date". When you define it as a date, Kendo fills in any missing data points with blanks to make it look correct. To do this, you may need to convert the dates to ones that can be ordered correctly by category.

Instead, kendo can automatically aggregate your data so it can be rolled up together. You can set this by setting baseUnit in CaregoryAxis to "fit"

$("#chart").kendoChart({
  categoryAxis: {
    baseUnit: "fit"
  }
});

Related


How to make bars thicker in Kendo UI charts?

sony My graph contains calorie vs time data. Calories have a value every 15 minutes. I want to pull the bar closer. I am posting a sample of the data along with a link to jsFiddle. Also, is it possible to display the entire 24 hours on the graph and only show

How to make rounded corner bars in google charts

Mihir Bhatt I have the following chart with square bars I want it to make rounded bars using google charts like the image below white hat There is no standard configuration option to change the shape of the column But you can directly modify the svg when the c

How to make rounded corner bars in google charts

Mihir Bhatt I have the following chart with square bars I want it to make rounded bars using google charts like the image below white hat There is no standard configuration option to change the shape of the column But you can directly modify the svg when the c

How to make rounded corner bars in google charts

Mihir Bhatt I have the following chart with square bars I want it to make rounded bars using google charts like the image below white hat There is no standard configuration option to change the shape of the column But you can directly modify the svg when the c

How to make rounded corner bars in google charts

Mihir Bhatt I have the following chart with square bars I want it to make rounded bars using google charts like the image below white hat There is no standard configuration option to change the shape of the column But you can directly modify the svg when the c

How to make rounded corner bars in google charts

Mihir Bhatt I have the following chart with square bars I want it to make rounded bars using google charts like the image below white hat There is no standard configuration option to change the shape of the column But you can directly modify the svg when the c

How to make rounded corner bars in google charts

Mihir Bhatt I have the following chart with square bars I want it to make rounded bars using google charts like the image below white hat There is no standard configuration option to change the shape of the column But you can directly modify the svg when the c

How to control the animation of Kendo UI charts?

hirapala Is there a way to slow down the initial speed of the animation while the kendo ui chart control is loading? I am using a panel bar control and I am loading a kendo ui pie chart. When I click on an item of the panel bar, the content is loaded to the pa

How to control the animation of Kendo UI charts?

Parth hirapara Is there a way to slow down the initial speed of the animation while the kendo ui chart control is loading? I am using a panel bar control and I am loading a kendo ui pie chart. When I click on the panel bar's item, the content is loaded to the

How to control the animation of Kendo UI charts?

Parth hirapara Is there a way to slow down the initial speed of the animation while the kendo ui chart control is loading? I am using a panel bar control and I am loading a kendo ui pie chart. When I click on the panel bar's item, the content is loaded to the

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

Make Material-ui icons thicker

Maartinus I want to display a disabled but give feedback button using block icons from material icons like in this answer . It works, however, it looks better when the icon is thicker. Can I make imported icons look thicker? Modifying the pen width in the SVG

How to make intellisense work with Kendo UI?

Shaul Behr I just started experimenting with Kendo UI in Visual Studio 2013 (2014 Q1). I'm following one of the walkthrough tutorials in it, and while the code works fine, I'm not getting the Intellisense of the Kendo object as I would expect. Where's the secr

How to make intellisense work with Kendo UI?

Shaul Behr I just started experimenting with Kendo UI in Visual Studio 2013 (2014 Q1). I'm following one of the walkthrough tutorials in it, and while the code works fine, I'm not getting the Intellisense of the Kendo object as I would expect. Where's the secr

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is like this.

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC