Hi,
Is there anyway to hide data points with zero (0) value in a line chart? I'm currently using the line chart and can't seem to find an easy way to do this. Basically a line shows up at the 0 value on the graph and I rather not show the line at all.Provide me any solution how to remove the lines showing zero.Here i'm providing the code below
$.ajax({
type: "POST",
contentType: "application/json;charset=utf-8",
url: "dataVizWebService.asmx/GetSellInOfficeTrends",
dataType: "json",
success: function (data) {
$("#chart").kendoChart({
dataSource: {
data: data.d,
value: "#={0}>0"
},
legend: {
position: "bottom"
},
title: {
text: "Population"
},
series: [
{
type: "line",
field: "Population2010",
name: "Population2010",
axis: "Year",
color: "#4a7ebb"
}, {
type: "line",
field: "Population2011",
name: "Population2011",
axis: "Year",
color: "#be4b48"
}, {
type: "line",
field: "Population2012",
name: "Population2012",
axis: "Year",
color: "#98b954"
}, {
type: "line",
missingValues: "zero",
field: "Population2013",
name: "Population2013",
axis: "Year",
dashType: "dash",
color: "#000000"
}
],
valueAxis: [{
name: "Year",
title: { text: "Population in Millions" }
}],
categoryAxis: {
field: "Week",
majorTickType: "none",
labels: {
skip: 0
}
},
tooltip: {
visible: true
}
})
}
});
Is there anyway to hide data points with zero (0) value in a line chart? I'm currently using the line chart and can't seem to find an easy way to do this. Basically a line shows up at the 0 value on the graph and I rather not show the line at all.Provide me any solution how to remove the lines showing zero.Here i'm providing the code below
$.ajax({
type: "POST",
contentType: "application/json;charset=utf-8",
url: "dataVizWebService.asmx/GetSellInOfficeTrends",
dataType: "json",
success: function (data) {
$("#chart").kendoChart({
dataSource: {
data: data.d,
value: "#={0}>0"
},
legend: {
position: "bottom"
},
title: {
text: "Population"
},
series: [
{
type: "line",
field: "Population2010",
name: "Population2010",
axis: "Year",
color: "#4a7ebb"
}, {
type: "line",
field: "Population2011",
name: "Population2011",
axis: "Year",
color: "#be4b48"
}, {
type: "line",
field: "Population2012",
name: "Population2012",
axis: "Year",
color: "#98b954"
}, {
type: "line",
missingValues: "zero",
field: "Population2013",
name: "Population2013",
axis: "Year",
dashType: "dash",
color: "#000000"
}
],
valueAxis: [{
name: "Year",
title: { text: "Population in Millions" }
}],
categoryAxis: {
field: "Week",
majorTickType: "none",
labels: {
skip: 0
}
},
tooltip: {
visible: true
}
})
}
});