Responsive Legend
-
Hi
I’m trying to set up a responsive legend:
– there are only 3 items in the legend, so I’d like to have a single row.
– works fine for desktop, but mobile resolves to 2 rows (2 items in the first and 1 item in the second row).
– the responsive wrapper works fine – I can make other changes to fontsize, color, etc for mobile.Other than this one issue, the responsive function works fine!
// adjust legend – horiz pos
legend.setAll ( {
y: null,
centerY: null,
x: am5.p50,
centerX: am5.percent ( 50 ),
dx: 0,
dy: 0,layout: am5.GridLayout.new ( root, {
maxColumns: 3,
maxRows: 1,
fixedWidthGrid: false,} )
} );// adjust labels
legend.labels.template.setAll ( {
fontSize: “.8rem”,
fontWeight: “300”,maxWidth: 20,
// notes
// – the following params don;t seem to work with multi-column grids
// oversizedBehavior: “truncate”,
// ellipsis: “…”,} );`
`etc…The page I need help with: [log in to see the link]
- The topic ‘Responsive Legend’ is closed to new replies.