* Highchart *禁用图表标题并在下载/打印时显示

时间:2015-12-14 11:46:47

标签: javascript charts highcharts title

我有一个带有图表标题的图表:public class AccountHolder_to implements Parcelable { private Integer A_A_accountNumber; private String A_email; private String A_username; private String A_password; private String A_syncedURL; private Demographics_to A_A_patientID; public AccountHolder_to () { super(); } private AccountHolder_to(Parcel in) { super(); this.A_A_accountNumber= in.readInt(); this.A_email = in.readString(); this.A_username = in.readString(); this.A_password = in.readString(); this.A_syncedURL = in.readString(); this.A_A_patientID = in.readParcelable(Demographics_to.class.getClassLoader()); } public int getA_A_accountNumber() {return A_A_accountNumber;} public void setA_A_accountNumber(int id) { this.A_A_accountNumber = id; } public String getA_email() { return A_email; } public void setA_email(String email) { this.A_email = email; } public String getA_username() { return A_username; } public void setA_username(String un) { this.A_username = un; } public String getA_password() { return A_password; } public void setA_password(String pw) { this.A_password = pw; } public String getA_syncedURL() { return A_syncedURL; } public void setA_syncedURL(String sr) { this.A_syncedURL = sr; } public Demographics_to getA_A_patientID() { return A_A_patientID; } public void setA_A_patientID(Demographics_to pi) { this.A_A_patientID = pi; } @Override public String toString() { return "accountHolder_Table [A_accountNumber:" + A_A_accountNumber + ", name:" + A_email + ",username:" + A_username + "password:" + A_password + "syncedurl:" +A_syncedURL +"patientid:" + A_A_patientID+ "]"; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int flags) { parcel.writeInt(getA_A_accountNumber()); parcel.writeString(getA_email()); parcel.writeString(getA_username()); parcel.writeString(getA_password()); parcel.writeString(getA_syncedURL()); parcel.writeParcelable(getA_A_patientID(), flags); } public static final Parcelable.Creator<AccountHolder_to> CREATOR = new Parcelable.Creator<AccountHolder_to>() { public AccountHolder_to createFromParcel(Parcel in) { return new AccountHolder_to(in); } public AccountHolder_to[] newArray(int size) { return new AccountHolder_to[size]; } }; @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + A_A_accountNumber; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; AccountHolder_to other = (AccountHolder_to) obj; if (A_A_accountNumber != other.A_A_accountNumber) return false; return true; } } ,想要询问是否可以禁用图表的标题,然后在下载/打印图表时,标题将仅显示在下载/打印的图片?可能吗 ?

谢谢

1 个答案:

答案 0 :(得分:4)

您可以在导出中定义此参数,并将默认标题设置为null,如下所示:

var $clone = $("#MainConfig").clone(false);
$clone.removeAttr('id'); // remove id="MainConfig"
$clone.find('[id]').removeAttr('id'); // remove all other id attributes
$clone.appendTo($("#smallConfig")); // add to DOM.

这是worked demo