ITADN

axes updates fail on some Rmd pages

#281Closedtdhock 创建于 2025-11-28
T
tdhockcommented
```js function update_grids(p_name, axes, panel_i, grid_vals, scales){ // Select panel to update var bgr = element.select("#plot_"+p_name).select(".bgr"+panel_i); // Update major and minor grid lines ["minor", "major"].forEach(function(grid_class, j){ var lines = bgr.select(".grid_"+grid_class).select("."+axes); var xy1, xy2; if(axes == "x"){ xy1 = lines.select("line").attr("y1"); xy2 = lines.select("line").attr("y2"); ``` failure happens on xy1, selection is null. In fact `element.select("#plot_"+p_name)` is also null. fix is to change that to `element.select("#"+p_info.plot_id)`
关闭于 2025-12-02 1 条评论