Plotly.js: dragmode options?

Created on 18 Jan 2016  路  2Comments  路  Source: plotly/plotly.js

Maybe I'm missing this in the docs somewhere, but I just cannot find what options are available for "dragmode". I'm looking to use only x-x axis drag and zoom, and to disable zooming in on a y to y axis point. I see there is "zoom" and "lasso", but are there ay others?

Most helpful comment

Disregard, after brute-force searching the docs I was able to find what I was looking for in one of the examples: https://plot.ly/javascript/disable-zoom/#disabling-zoom-events-for-x-axis.

For those curious,

layout = {
  yaxis: { fixedrange: true }
}

Will prevent users from click-drag-selecting-zoom on that axis.

I suppose my "issue" here is actually that there's no documentation giving a giant list of searchable terms... but I see that 20 seconds before I posted this @etpinard listed exactly that: https://plot.ly/javascript/reference/#layout-yaxis-fixedrange. It would be great if that reference wasn't nested inside of "Javascript Main Page" > "Function Reference" > "Reference of all of valid keys of Plotly.js graphs", but sat somewhere on "Javascript Main Page" as something like "Complete API".

All 2 comments

Look up layout.yaxis.fixedrange: https://plot.ly/javascript/reference/#layout-yaxis-fixedrange

For future questions about plotly.js:

Note that GitHub issues are reserved for bug reports and feature requests only.
Implementation questions should be asked on Stack Overflow (tagged plotly) or on
community.plot.ly (tagged plotly-js).

Disregard, after brute-force searching the docs I was able to find what I was looking for in one of the examples: https://plot.ly/javascript/disable-zoom/#disabling-zoom-events-for-x-axis.

For those curious,

layout = {
  yaxis: { fixedrange: true }
}

Will prevent users from click-drag-selecting-zoom on that axis.

I suppose my "issue" here is actually that there's no documentation giving a giant list of searchable terms... but I see that 20 seconds before I posted this @etpinard listed exactly that: https://plot.ly/javascript/reference/#layout-yaxis-fixedrange. It would be great if that reference wasn't nested inside of "Javascript Main Page" > "Function Reference" > "Reference of all of valid keys of Plotly.js graphs", but sat somewhere on "Javascript Main Page" as something like "Complete API".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tim-sauchuk picture tim-sauchuk  路  3Comments

hashimmoosavi picture hashimmoosavi  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments

n-riesco picture n-riesco  路  3Comments

HunterMcGushion picture HunterMcGushion  路  3Comments