| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good and handles the issue well. I made a few comments.
Sorry, something went wrong.
| // the 300px-wide plot area spans exactly one day, so 0px is local midnight | ||
| // and 150px is local noon, in any timezone | ||
| function makeDatePlot(gd, layoutExtras) { | ||
| return makePlot(gd, Lib.extendFlat({ xaxis: { type: 'date', range: [dayStart, dayEnd] } }, layoutExtras), { |
There was a problem hiding this comment.
Should arguments 2 and 3 be swapped? Or should layoutExtras be renamed to traceExtras?
Sorry, something went wrong.
There was a problem hiding this comment.
Good catch, this got messed up. Updated to standardize to (gd, traceExtras, layoutExtras) arguments for both makePlot and makeDatePlot.
Sorry, something went wrong.
| @@ -0,0 +1 @@ | |||
| - Return actual data values (rather than calcdata values) for `xvals` / `yvals` in `hoveranywhere` and `clickanywhere` events [[#7964](https://github.com/plotly/plotly.js/pull/7964)] | |||
There was a problem hiding this comment.
Maybe throw a breaking change notice in here?
| - Return actual data values (rather than calcdata values) for `xvals` / `yvals` in `hoveranywhere` and `clickanywhere` events [[#7964](https://github.com/plotly/plotly.js/pull/7964)] | |
| - **Breaking**: Return actual data values (rather than calcdata values) for `xvals` / `yvals` in `hoveranywhere` and `clickanywhere` events [[#7964](https://github.com/plotly/plotly.js/pull/7964)] |
Sorry, something went wrong.
|
Could you also take look at updating the hand written TS types per this change? |
Sorry, something went wrong.
@camdecoster Just took a look, I don't think any updates are needed for this PR since xvals and yvals are type Datum[] which already covers both numbers and strings. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #7816
Modify hoverdata and clickdata such that the xvals / yvals properties always contain data values (in the same form as the input data, i.e. may be strings in some cases) rather than calcdata values (which are always numeric).
Result:
The attribute descriptions for hoveranywhere / clickanywhere refer to xvals and yvals being "in data space", so I believe this was always the intended behavior.
Steps for testing
- Check out this branch
- Create the following HTML file in the repo root. This HTML page creates a plotly.js plot where the x-axis is a date axis and the y-axis is a category axis:
Details