Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

chart title

$
0
0

To get 2 lines put a '\n' where you want the line break:  "Q1 BTI vs, POR\n(with open po's from 2015)"

To change the font size of the second line, I use the render event to get the text element of the second line and manipulate it.  Set the x coordinate to the center of the chart, change the text-anchor to middle and then get the second element and change its font size:

$("#chart").kendoChart({
  title: {
    text: "Q1 BTI vs, POR\n(with open po's from 2015)",
    font: "20px sans-serif",
    color: "rgba(55,55,55,0.999)"
  },
  series: [
    { data: [1, 2, 3] }
  ],
  render: function(e){
    $('[fill="rgba(55,55,55,0.999)"]').attr("x", e.sender.element.width() / 2).attr("text-anchor", "middle")[1].style.fontSize = "12px";
  }
});

 

DEMO


Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>