Title: chart_legend attribute
Last modified: August 31, 2016

---

# chart_legend attribute

 *  Resolved [FPDarren](https://wordpress.org/support/users/fpdarren-1/)
 * (@fpdarren-1)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/chart_legend-attribute/)
 * As described in the documentation for Google charts the position and number of
   lines can be determined like so:
    `legend: { position: 'top', maxLines: 3 }`
 * In the shortcode I can do:
    `chart_legend="top"` which works great, but is it
   also possible to add the maxLines value to the shortcode attribute? I’ve tried
   numerous ways such as separating with a space or a comma but no luck so far.
 * Any help with this would be most appreciated,
    Many thanks Darren
 * [https://wordpress.org/plugins/inline-google-spreadsheet-viewer/](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)

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

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/chart_legend-attribute/#post-7027504)
 * Yes, in these cases where you need to represent an object that sets more than
   one property in a single shortcode attribute, you need to write the properties
   in JSON format. For your example you will need to write it like this:
 * `chart_legend='{ "position": "top", "maxLines": 3 }'`
 *  Thread Starter [FPDarren](https://wordpress.org/support/users/fpdarren-1/)
 * (@fpdarren-1)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/chart_legend-attribute/#post-7027537)
 * That’s great, all working now.
    Thank you 🙂

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

The topic ‘chart_legend attribute’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [FPDarren](https://wordpress.org/support/users/fpdarren-1/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/chart_legend-attribute/#post-7027537)
 * Status: resolved