有没有办法在Highcharts中禁用标题和副标题? [英] Is there a way to disable the Title and Subtitle in Highcharts?

查看:1631
本文介绍了有没有办法在Highcharts中禁用标题和副标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是要使用图形周围的html进行硬编码,我不想使用内建的。



我没有请在API中查看disable:true选项。



有人可以帮我解决问题吗?你是否禁用了highcharts中的标题/副标题?



(如果你简单地将文本留空,它仍会在标题所在的位置留下空格,我会就像没有发生这种情况一样)

解决方案

将标题文本设置为空字符串是实现它的方法。 >

在这种情况下没有为标题创建空间:

没有文本: http://jsfiddle.net/jlbriggs/JVNjs/284/

与文本: http://jsfiddle.net/jlbriggs/JVNjs/286/

  title:{
text:''
}

如果你想在这种情况下留下更少的空间,只需将'marginTop'设置为0



{{由于无数评论而导致编辑

正如以下指出的那样, c $ c> text:null 作为实现此目的的方法。



任何一种方法都可以达到理想的效果。 b

I'm just going to hardcode it in using html that is around the graph, I don't want to use the built in.

I don't see a "disable: true" option in the API.

Can anybody help me out here.

How do you disable the title / subtitle in highcharts?

(if you simply leave the text blank it still carves out a whitespace in that spot where the title is, i'd like to not have this happen)

解决方案

Setting the title text to an empty string is the way to do it.

No space is created for the title in that case:

without text: http://jsfiddle.net/jlbriggs/JVNjs/284/

with text: http://jsfiddle.net/jlbriggs/JVNjs/286/

title:{
    text:''
}

If you want less space than is left in that case, simply set your 'marginTop' to 0

{{edit due to numerous comments:

As pointed out a number of times below, the documentation now states text: null as the method to achieve this.

Either method achieves the desired result.

这篇关于有没有办法在Highcharts中禁用标题和副标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆