# Canvas plots: is it possible to access the full range of flot options?

**URL:** https://discuss.elastic.co/t/canvas-plots-is-it-possible-to-access-the-full-range-of-flot-options/169831
**Category:** Kibana
**Tags:** canvas
**Created:** [February 25, 2019, 12:44pm UTC](https://discuss.elastic.co/t/canvas-plots-is-it-possible-to-access-the-full-range-of-flot-options/169831 "2019-02-25T12:44:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rozling](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rozling/32/16401_2.png) [@rozling](https://discuss.elastic.co/u/rozling)
#### Post date: [February 25, 2019, 12:44pm UTC](https://discuss.elastic.co/t/canvas-plots-is-it-possible-to-access-the-full-range-of-flot-options/169831/1 "2019-02-25T12:44:13Z")

</div>

Sorry for the topic spam! I just have many questions...

I'm using Kibana 6.4.3, and I was looking into a way to set the max value of a Y axis on a plot.

I saw that we have [axisConfig](https://www.elastic.co/guide/en/kibana/current/canvas-common-functions.html#_axisconfig) which seems to only expose `position`, but then I noticed Canvas [uses flot](https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts/API.md) for plotting which has lots of options (including axis customisation & max values).

I was hoping it would be something as simple as `yaxis={axisConfig max=100}`, but axisConfig doesn't seem to know about the `max` argument. Maybe this is available in newer versions?

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [March 1, 2019, 5:09pm UTC](https://discuss.elastic.co/t/canvas-plots-is-it-possible-to-access-the-full-range-of-flot-options/169831/2 "2019-03-01T17:09:29Z")

</div>

`min` and `max` are definitely [arguments for axisConfig](https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/axisConfig.js#L28-L37), and they have been for a very long time.

And it does look like the [values are passed on to flot](https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/plot/get_flot_axis_config.js#L25-L32). If you're using a number value, it'll use that, but note that strings get cast to dates.

So, this should work, and the expression you use should be exactly the one you shared here.

I'm getting a syntax error when I try that though, which isn't correct, so I've got a new bug to chase down. Are you seeing an error, or is it just not using the value?

UPDATE: Found the issue, I'll get it fixed today and backport it to at least the next 6.6 release. If you're also seeing an error, you can work around it by adding the `position` argument, like so:

`yaxis={axisConfig position=left max=100}`

Use whatever you want for the position of course, the important part is that it _must_ be included if you're using the `axisConfig` function.

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [March 1, 2019, 7:13pm UTC](https://discuss.elastic.co/t/canvas-plots-is-it-possible-to-access-the-full-range-of-flot-options/169831/3 "2019-03-01T19:13:00Z")

</div>

Here's the fix for `axisConfig`: [https://github.com/elastic/kibana/pull/32335](https://github.com/elastic/kibana/pull/32335)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 29, 2019, 7:13pm UTC](https://discuss.elastic.co/t/canvas-plots-is-it-possible-to-access-the-full-range-of-flot-options/169831/4 "2019-03-29T19:13:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
