Hi
I am using the Render event on a chart to add a subtitle with the code is based on the Kendo example "Display the Chart Title on Multiple Lines and Use Different Fonts". The problem i am having is that my subtitle is not centered and I assumed that because the chart title is centered by default then the subtitle would be as well. If you look at the dojo for the above mentioned example the subtitle is centered, however if you change the text of the second line to that shown below, you will see that is is no longer centerred. How can I ensure that my sub title is always centered.
Thanks
<script>
$("#chart").kendoChart({
title: {
text: "Total account value (USD):\ntextplaceholder\nClick a bar to drill down",
position: "bottom"
},
series: [{
data: [1, 2, 3]
}],
render: function(e) {
var tph = e.sender.element.find("text:contains(textplaceholder)");
tph.hide();
var secondLine = e.sender.element.find("text:contains(Click)");
$(secondLine).css({
"font-size": "10px"
});
}
});
</script>
I am using the Render event on a chart to add a subtitle with the code is based on the Kendo example "Display the Chart Title on Multiple Lines and Use Different Fonts". The problem i am having is that my subtitle is not centered and I assumed that because the chart title is centered by default then the subtitle would be as well. If you look at the dojo for the above mentioned example the subtitle is centered, however if you change the text of the second line to that shown below, you will see that is is no longer centerred. How can I ensure that my sub title is always centered.
Thanks
<script>
$("#chart").kendoChart({
title: {
text: "Total account value (USD):\ntextplaceholder\nClick a bar to drill down",
position: "bottom"
},
series: [{
data: [1, 2, 3]
}],
render: function(e) {
var tph = e.sender.element.find("text:contains(textplaceholder)");
tph.hide();
var secondLine = e.sender.element.find("text:contains(Click)");
$(secondLine).css({
"font-size": "10px"
});
}
});
</script>