JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.dataviz.min.css">
<div id="ComfortChart"></div>
JavaScript
var ComfortWindowData= [
{
Cold: 10,
Cool: 20,
Comfortable: 10,
Warm: 10,
Hot: 10,
Count: 20
},
{
Cold: 30,
Cool: 10,
Comfortable:20,
Warm: 20,
Hot: 5,
Count: 10
},
{
Cold: 5,
Cool: 20,
Comfortable:30,
Warm: 20,
Hot:10,
Count: 20
},
]
$("#ComfortChart").kendoChart(
{
dataSource:
{
data: ComfortWindowData
},
title:
{
text: "Comfort Feedback"
},
valueAxis:
[
{
name: "percentage",
min: 0,
max: 100
},
{
name: "count"
}
],
chartArea:
{
background: "#E9E9EB"
},
seriesDefaults:
{
spacing: 2,
stack: {stack:'100%'},
axis: "percentage"
},
series:
[
{
field: "Cold",
name: "Cold",
color: "blue",
gap: 2
},
{
field: "Cool",
name: "Cool",
color: "lightblue",
gap: 2
},
{
field: "Comfortable",
name: "Comfortable",
color: "green",
gap: 2
},
{
field: "Warm",
name: "Warm",
color: "orange",
gap: 0
},
{
field: "Hot",
name: "Hot",
color: "red",
gap: 0
},
{
field: "Count",
name: "Count",
color: "black",
...