ZingChart: How to set titles on Treemaps

Titles can be set on treemaps easily if we keep in mind margins.

Normally we simply set titles by using:

title: {
    text: "Title text here"
}


For treemaps, this is only half the solution. We also have to set margins so that the treemap title is revealed.

Setting margins for title would look something like this:

plotarea: {
    margin: "40 0 0 0"
}

Using both these code blocks we can see the title for treemaps. Here is an example of how treemap is set:

DEMO

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us