You must be logged in to post your query.
Home › Forums › Chart Support › Hiding the legend on a small screen
Tagged: legend, mobile device, responsiveness
How would I go about hiding the legend on a smaller screen? See my jsfiddle here.
As you can see, a legend with a large number of data series tends to squash the actual data when the graph has a limited height (130px). I would like the legend to display:none when viewing the graph on a small screen device, e.g. less than 500px.
You can hide all the legends based on chart height or window width by setting showInLegend to false for smaller screen devices as shown in this JSFiddle.
Thanks Vishwas. That’s brilliant.
You must be logged in to reply to this topic. Login/Register