Title: Responsive Legend
Last modified: October 15, 2022

---

# Responsive Legend

 *  [yinxingmaiming](https://wordpress.org/support/users/yinxingmaiming/)
 * (@yinxingmaiming)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fresponsive-legend%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [martynasma](https://wordpress.org/support/users/martynasma/)
 * (@martynasma)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/responsive-legend/#post-16106384)
 * This sounds like a complex amCharts-related question, rather than one related
   to WP plugin.
 * Can you repost your question on GitHub?
 * [https://github.com/amcharts/amcharts5/issues](https://github.com/amcharts/amcharts5/issues)
 * Also, if you could isolate your chart in question into a CodePen, that would 
   go a great lengths towards a quicker solution.
 *  Thread Starter [yinxingmaiming](https://wordpress.org/support/users/yinxingmaiming/)
 * (@yinxingmaiming)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/responsive-legend/#post-16106640)
 * OK, will do.
 * But in the short-term, can I just ask – is there any limit to the number of columns
   in a responsive legend – meaning, is amcharts somehow hard-coded so there can’t
   be more than 2 columns for a mobile form factor?
 * Thx – not trying wiggle out of posting on github, but the above is my real question…:
   >)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Responsive Legend’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amcharts-charts-and-maps_6f74b0.svg)
 * [amCharts: Charts and Maps](https://wordpress.org/plugins/amcharts-charts-and-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amcharts-charts-and-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amcharts-charts-and-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/amcharts-charts-and-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amcharts-charts-and-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amcharts-charts-and-maps/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [yinxingmaiming](https://wordpress.org/support/users/yinxingmaiming/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/responsive-legend/#post-16106640)
 * Status: not resolved