Jump to content
JChartFX Community
  • 0
amjadhussen

Chart not showing when size of div is small

Question

Hi Juan,

I am creating charts inside resizable divs. (for this I am using gridster). The problem is when the size of the div is small, the chart does not show properly. However when the size of the div is proper everything works fine. Can you please help me on that. I am attaching the screen shots for both the small div as well as large div.

Thanks,

AmjadHussen Shekh 

smallsize.PNG

normalsize.PNG

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

There are several ways to improve the plot area size in charts, including

1) Removing the border

chart1.setBorder(null);

2) Hiding the legend box

chart1.getLegendBox().setVisible(false);

3) Decreasing the margin size around the plot area

var margin = chart1.getPlotAreaMargin();
margin.setLeft(5);
margin.setTop(5);
margin.setRight(5);
margin.setBottom(5);

4) Decreasing the font size (assuming you are not using our attributes CSS)

chart1.setFont("7pt Arial");

If this do not work, please post a small code snippet showing the customizations you are doing to the chart and the size you are using for the small divs

Regards,

JuanC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×