Skip to content

Legend Overflow Handling #6545

@RobTables

Description

@RobTables

I have been using Chart.js 2 quite a lot recently and there is one feature I have seen suggested but has been overlooked. Adding overflow handling for the legend would help me out immensely. Currently I have some datasets that could have anywhere from 10 - 50 keys in the legend. I have seen solutions like those found here but would like to avoid having to separate my legend from the chart. Adding the ability to set the dimensions of the legend within the canvas object as well as what do when our labels go beyond those dimensions would be very beneficial to my projects.

			legend:{
				labels:{
					fontStyle: "bold",
				},
				display: true,
				position: 'right',
                                width: 100, //suggested
                                height: 200, //suggested
                                overflowX: hide, //suggested
                                overflowY: scroll, //suggested
			},

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions