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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...