简体   繁体   English

在 Google 图表中的标题后添加换行符

[英]Adding a line break after title in Google Charts

I am trying to put a line break after a title in Google Charts or before the chart starts (I have a column chart with defined axis, but not single data cell or tab).我试图在 Google Charts 中的标题之后或图表开始之前放置一个换行符(我有一个带有定义轴的柱形图,但不是单个数据单元格或选项卡)。 Is there any possibility to do so in Google Charts?谷歌图表有没有可能这样做?

I can't seem to find a good answer.我似乎找不到一个好的答案。

The fronts are written in html/css and jQuery/JavaScript.前端是用 html/css 和 jQuery/JavaScript 编写的。

Append break in your title.在标题中添加中断。

Before "I am Title""I am Title"之前

Now "I am Title\r\n/I am chart"现在"I am Title\r\n/I am chart"

It will display like this它会像这样显示

 I am Title 
 I am Chart

At I am Chart you can add your chart Its better to add line break from backend from where you are getting the data.在我是图表,您可以添加图表最好从您获取数据的后端添加换行符。

I use C# so I would have done at backend like this我使用 C#,所以我会在后端这样做

Title + Environment.NewLine + Chart

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM