@datagrok/curves 1.2.13 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/curves",
3
3
  "friendlyName": "Curves",
4
- "version": "1.2.13",
4
+ "version": "1.2.14",
5
5
  "description": "Curves provides support for fitted curves (such as dose-response curves), including in-grid rendering, storing charts in cells, interactivity, and automatic fitting.",
6
6
  "author": {
7
7
  "name": "Dmytro Kovalyov",
@@ -52,6 +52,8 @@ const MIN_TITLE_PX_WIDTH = 275;
52
52
  const MIN_TITLE_PX_HEIGHT = 225;
53
53
  const MIN_X_AXIS_NAME_VISIBILITY_PX_WIDTH = 180;
54
54
  const MIN_Y_AXIS_NAME_VISIBILITY_PX_HEIGHT = 140;
55
+ const MIN_DROPLINES_VISIBILITY_PX_WIDTH = 120;
56
+ const MIN_DROPLINES_VISIBILITY_PX_HEIGHT = 110;
55
57
  const AXES_LEFT_PX_MARGIN = 38;
56
58
  const AXES_LEFT_PX_MARGIN_WITH_AXES_LABELS = 45;
57
59
  const AXES_TOP_PX_MARGIN = 5;
@@ -371,6 +373,7 @@ export class FitChartCellRenderer extends DG.GridCellRenderer {
371
373
  const showAxesLabels = w >= MIN_X_AXIS_NAME_VISIBILITY_PX_WIDTH && h >= MIN_Y_AXIS_NAME_VISIBILITY_PX_HEIGHT
372
374
  && !!data.chartOptions?.xAxisName && !!data.chartOptions.yAxisName;
373
375
  const showTitle = w >= MIN_TITLE_PX_WIDTH && h >= MIN_TITLE_PX_HEIGHT && !!data.chartOptions?.title;
376
+ const showDroplines = w >= MIN_DROPLINES_VISIBILITY_PX_WIDTH && h >= MIN_DROPLINES_VISIBILITY_PX_HEIGHT;
374
377
  const [dataBox, xAxisBox, yAxisBox] = layoutChart(screenBounds, showAxesLabels, showTitle);
375
378
 
376
379
  const dataBounds = getChartBounds(data);
@@ -461,7 +464,7 @@ export class FitChartCellRenderer extends DG.GridCellRenderer {
461
464
  fillConfidenceInterval(g, confidenceIntervals, screenBounds, viewport, showAxes, showAxesLabels, chartLogOptions);
462
465
  }
463
466
 
464
- if (series.droplines && showAxesLabels) {
467
+ if (series.droplines && showDroplines) {
465
468
  g.save();
466
469
  g.strokeStyle = 'blue';
467
470
  g.lineWidth = ratio;