I am creating a chart using Kendo DataBiz: Code as below
1) Charts gets displayed
2) Once user click the Legend (Spots) it hide the Spots bar
3) But Bar does not appear back once user select the Spots Legend again
4) Line on other hand works quite well.
See attached with screenshot.
Code as below:
$("#ChartTopnPrograms").kendoChart({
dataSource: {
data:
data[0]
},
chartArea: {
width: 750,
height: 280
,background: ""
},
theme: '@Model.SelectedTheme',
// title: {
// //text:
"Top n Programs between " + kendo.toString(start.value(),
"dd-MMM-yyyy") + " to " + kendo.toString(end.value(),
"dd-MMM-yyyy"),
// font:
"12px sans-serif"
// },
legend: {
position: "right"
},
seriesDefaults:
{
type: "bar"
},
series: [{
field: "ProgramCount",
name: "Spots"
}
, {
type: "line",
field: "Value",
name: "Actual Value",
axis: "Value"
}
],
categoryAxis: {
field: "ProgramName",
name: "Program",
axisCrossingValues: [0, 100],
labels: {
font: "11.5px Arial,Helvetica,sans-serif"
}
},
valueAxis: [{
labels: {
template: "#= kendo.format('{0:N0}',
value) #"
},
title: { text: "" }
}, {
labels: {
template: "#= kendo.format('{0:N0}',
value) #"
},
name: "Value",
title: {
text: "Value" }
}
],
tooltip: {
visible: true,
format: "{0}",
template: "#= series.name #:#= kendo.format('{0:N0}', value)
#"
}
});
1) Charts gets displayed
2) Once user click the Legend (Spots) it hide the Spots bar
3) But Bar does not appear back once user select the Spots Legend again
4) Line on other hand works quite well.
See attached with screenshot.
Code as below:
$("#ChartTopnPrograms").kendoChart({
dataSource: {
data:
data[0]
},
chartArea: {
width: 750,
height: 280
,background: ""
},
theme: '@Model.SelectedTheme',
// title: {
// //text:
"Top n Programs between " + kendo.toString(start.value(),
"dd-MMM-yyyy") + " to " + kendo.toString(end.value(),
"dd-MMM-yyyy"),
// font:
"12px sans-serif"
// },
legend: {
position: "right"
},
seriesDefaults:
{
type: "bar"
},
series: [{
field: "ProgramCount",
name: "Spots"
}
, {
type: "line",
field: "Value",
name: "Actual Value",
axis: "Value"
}
],
categoryAxis: {
field: "ProgramName",
name: "Program",
axisCrossingValues: [0, 100],
labels: {
font: "11.5px Arial,Helvetica,sans-serif"
}
},
valueAxis: [{
labels: {
template: "#= kendo.format('{0:N0}',
value) #"
},
title: { text: "" }
}, {
labels: {
template: "#= kendo.format('{0:N0}',
value) #"
},
name: "Value",
title: {
text: "Value" }
}
],
tooltip: {
visible: true,
format: "{0}",
template: "#= series.name #:#= kendo.format('{0:N0}', value)
#"
}
});