I am currently using knockout-js with kendo to make a funnel chart. I have the following set-up:
this.chartOptions = ko.observable({
series: [{
type: "funnel",
dynamicSlope: false,
field: "data",
categoryField: "description",
dynamicHeight: false,
segmentSpacing: 5,
labels: {
color: "#000",
visible: true,
background: "transparent",
align: "center",
// template: "#= category#<br/>#= value#",
template: "#= category#: #= kendo.format('{0:p}',value)#",
font: "11px sans-serif; font-weight: bold",
},
}],
tooltip: {
visible: true,
template: "#= category#<br/>#= kendo.format('{0:p}',value/dataItem.parent()[0].data)#",
color: "#FFF"
}
});
My issue is that for some reason, if I add a breakline in the template string for the chart labels, it stops rendering. It completely breaks. However, the exact same template layout in the tooltip works perfectly. This is what I want: template: "#= category#: <br /> #= kendo.format('{0:p}',value)#", Many thanks for any help.
this.chartOptions = ko.observable({
series: [{
type: "funnel",
dynamicSlope: false,
field: "data",
categoryField: "description",
dynamicHeight: false,
segmentSpacing: 5,
labels: {
color: "#000",
visible: true,
background: "transparent",
align: "center",
// template: "#= category#<br/>#= value#",
template: "#= category#: #= kendo.format('{0:p}',value)#",
font: "11px sans-serif; font-weight: bold",
},
}],
tooltip: {
visible: true,
template: "#= category#<br/>#= kendo.format('{0:p}',value/dataItem.parent()[0].data)#",
color: "#FFF"
}
});
My issue is that for some reason, if I add a breakline in the template string for the chart labels, it stops rendering. It completely breaks. However, the exact same template layout in the tooltip works perfectly. This is what I want: template: "#= category#: <br /> #= kendo.format('{0:p}',value)#", Many thanks for any help.