@rfkit/charts 1.7.0 → 1.8.1

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.
@@ -0,0 +1,13 @@
1
+ interface AxisYLayoutOptions {
2
+ padding: number;
3
+ placement?: 'outside' | 'inside';
4
+ show?: boolean;
5
+ }
6
+ export declare const resolveAxisYLayout: ({ padding, placement, show }: AxisYLayoutOptions) => {
7
+ axisYWidth: string;
8
+ inside: boolean;
9
+ marginLeft: string;
10
+ pluginBoxWidth: string;
11
+ width: string;
12
+ };
13
+ export {};
@@ -1,6 +1,7 @@
1
1
  export default function useAxisYWidth(): {
2
- width: string;
3
2
  axisYWidth: string;
3
+ inside: boolean;
4
4
  marginLeft: string;
5
5
  pluginBoxWidth: string;
6
+ width: string;
6
7
  };
@@ -19,6 +19,10 @@ export declare enum FrequencyUnit {
19
19
  MHz = "MHz",
20
20
  GHz = "GHz"
21
21
  }
22
+ export declare enum AxisPlacement {
23
+ Outside = "outside",
24
+ Inside = "inside"
25
+ }
22
26
  export declare enum ChartType {
23
27
  SingleFrequency = "singleFrequency",
24
28
  Scan = "scan",
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import './theme/library.css';
2
2
  export { Dial, Gauge, Heatmap, IQ, LevelStream, Occupancy, Spectrum } from './charts';
3
- export { ChartType, FrequencyUnit, MarkerEventType, ModuleType, OptionKey, PSType, SegmentsEvent, SeriesType, ToolbarItemType, ToolType } from './config';
3
+ export { AxisPlacement, ChartType, FrequencyUnit, MarkerEventType, ModuleType, OptionKey, PSType, SegmentsEvent, SeriesType, ToolbarItemType, ToolType } from './config';
4
4
  export { type EnhancedPublish, useSafePublish, withChartPublisher } from './hooks';
5
5
  export { setFrequencyAllocationChannelsToCache, setFrequencyAllocationToCache } from './modules/Spectrum/FrequencyAllocation/tools';
6
6
  export { type ChartsThemeChange, type InitChartsThemeOptions, type InitChartsThemeResult, initChartsTheme } from './theme/init-charts-theme';
package/index.js CHANGED
@@ -4609,6 +4609,11 @@ var constants_FrequencyUnit = /*#__PURE__*/ function(FrequencyUnit) {
4609
4609
  FrequencyUnit["GHz"] = "GHz";
4610
4610
  return FrequencyUnit;
4611
4611
  }({});
4612
+ var constants_AxisPlacement = /*#__PURE__*/ function(AxisPlacement) {
4613
+ AxisPlacement["Outside"] = "outside";
4614
+ AxisPlacement["Inside"] = "inside";
4615
+ return AxisPlacement;
4616
+ }({});
4612
4617
  var constants_ChartType = /*#__PURE__*/ function(ChartType) {
4613
4618
  ChartType["SingleFrequency"] = "singleFrequency";
4614
4619
  ChartType["Scan"] = "scan";
@@ -5396,6 +5401,7 @@ function createParams() {
5396
5401
  },
5397
5402
  axisY: {
5398
5403
  show: true,
5404
+ placement: constants_AxisPlacement.Outside,
5399
5405
  disabled: false,
5400
5406
  gradientRibbon: true,
5401
5407
  realRange: constants_RANGE_DEFAULT,
@@ -18464,18 +18470,28 @@ const GaugeChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_js
18464
18470
  });
18465
18471
  const charts_Gauge_Gauge = withChartPublisher(GaugeChart, 'Gauge');
18466
18472
  const charts_Gauge = charts_Gauge_Gauge;
18467
- const useAxisYWidth_width = 40;
18468
- function useAxisYWidth_useAxisYWidth() {
18469
- const { state: { system: { padding }, axisY: { show } } } = useStore_useStore();
18470
- const w = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>show ? useAxisYWidth_width : 0, [
18471
- show
18472
- ]);
18473
+ const AXIS_Y_WIDTH = 40;
18474
+ const resolveAxisYLayout = ({ padding, placement, show })=>{
18475
+ const inside = 'inside' === placement;
18476
+ const visualWidth = false === show ? 0 : AXIS_Y_WIDTH;
18477
+ const reservedWidth = inside ? 0 : visualWidth;
18473
18478
  return {
18474
- width: `${w}px`,
18475
- axisYWidth: `${w + padding / 2}px`,
18479
+ axisYWidth: `${visualWidth + padding / 2}px`,
18480
+ inside,
18476
18481
  marginLeft: `${0 - padding / 2}px`,
18477
- pluginBoxWidth: `calc(100% - ${w}px)`
18482
+ pluginBoxWidth: 0 === reservedWidth ? '100%' : `calc(100% - ${reservedWidth}px)`,
18483
+ width: `${reservedWidth}px`
18478
18484
  };
18485
+ };
18486
+ function useAxisYWidth_useAxisYWidth() {
18487
+ const padding = useStore_useSelector((state)=>state.system.padding);
18488
+ const placement = useStore_useSelector((state)=>state.axisY.placement);
18489
+ const show = useStore_useSelector((state)=>state.axisY.show);
18490
+ return resolveAxisYLayout({
18491
+ padding,
18492
+ placement,
18493
+ show
18494
+ });
18479
18495
  }
18480
18496
  const RulerTicks_RulerTicks = ({ length = 10, tickColor = 'var(--chart-grid-strong)', tickHeight = 8, strokeWidth = 1, orientation = 'horizontal', split = 2 })=>{
18481
18497
  const renderTick = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((index)=>{
@@ -18699,7 +18715,7 @@ const AxisXTicks = ({ type })=>{
18699
18715
  });
18700
18716
  };
18701
18717
  const Ticks = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisXTicks);
18702
- const AxisX_AxisX = ({ type })=>{
18718
+ const AxisX = ({ type })=>{
18703
18719
  const { state: { axisX } } = useStore_useStore();
18704
18720
  const { children, unit, ticks } = axisX;
18705
18721
  const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
@@ -18737,7 +18753,7 @@ const AxisX_AxisX = ({ type })=>{
18737
18753
  })
18738
18754
  });
18739
18755
  };
18740
- const AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX_AxisX);
18756
+ const components_AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX);
18741
18757
  const FlexBox = (props)=>{
18742
18758
  const { children, className, style } = props;
18743
18759
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
@@ -24138,7 +24154,7 @@ const Heatmap_Chart_Chart = ({ publish, heatmapDefaultData })=>{
24138
24154
  heatmapDefaultData: heatmapDefaultData
24139
24155
  })
24140
24156
  }),
24141
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
24157
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
24142
24158
  type: constants_ChartType.Scan
24143
24159
  })
24144
24160
  ]
@@ -24709,7 +24725,7 @@ const SegmentsDisplayControl_SegmentsDisplayControl = ()=>{
24709
24725
  });
24710
24726
  };
24711
24727
  const SegmentsDisplayControl = SegmentsDisplayControl_SegmentsDisplayControl;
24712
- const SeriesControl_SeriesControl = ({ type })=>{
24728
+ const SeriesControl = ({ type })=>{
24713
24729
  const { state: { globalID } } = useStore_useStore();
24714
24730
  const { mode: currentMode } = useSeriesManager(globalID);
24715
24731
  const handleSeriesControl = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
@@ -24831,7 +24847,7 @@ const SeriesControl_SeriesControl = ({ type })=>{
24831
24847
  children: renderIcon()
24832
24848
  });
24833
24849
  };
24834
- const SeriesControl = SeriesControl_SeriesControl;
24850
+ const controls_SeriesControl = SeriesControl;
24835
24851
  const SeriesDisplayControl = ()=>{
24836
24852
  const { state: { globalID, series: seriesConfig } } = useStore_useStore();
24837
24853
  const filteredSeries = useFilteredSeries_useFilteredSeries(globalID);
@@ -25910,7 +25926,7 @@ const TOOLBAR_ITEM_CONFIGS = [
25910
25926
  ]
25911
25927
  },
25912
25928
  {
25913
- component: SeriesControl,
25929
+ component: controls_SeriesControl,
25914
25930
  toolType: constants_ToolbarItemType.SeriesControl,
25915
25931
  supportedCharts: [
25916
25932
  constants_ChartType.SingleFrequency,
@@ -26021,7 +26037,7 @@ const resolveToolbarItemProps = (config, chartType)=>{
26021
26037
  };
26022
26038
  return config.props;
26023
26039
  };
26024
- const Toolbar_Toolbar = ({ type })=>{
26040
+ const Toolbar = ({ type })=>{
26025
26041
  const show = useStore_useSelector((state)=>state.toolbar.show);
26026
26042
  const hiddenTools = useStore_useSelector((state)=>state.toolbar.hiddenTools ?? []);
26027
26043
  const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
@@ -26053,7 +26069,7 @@ const Toolbar_Toolbar = ({ type })=>{
26053
26069
  })
26054
26070
  });
26055
26071
  };
26056
- const Toolbar = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(Toolbar_Toolbar);
26072
+ const components_Toolbar = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(Toolbar);
26057
26073
  function useLevelStreamAnalyzer() {
26058
26074
  const { state: { globalID, axisY, levelStream } } = useStore_useStore();
26059
26075
  const range = axisY.range ?? constants_RANGE_DEFAULT;
@@ -26203,10 +26219,30 @@ const Level_Level = (props)=>{
26203
26219
  });
26204
26220
  };
26205
26221
  const Level = Level_Level;
26206
- const LINE_WIDTH_BASE = 0.5;
26207
26222
  const MAJOR_TICK_LENGTH = 6;
26208
26223
  const MINOR_TICK_LENGTH = 4;
26209
26224
  const TEXT_OFFSET = 8;
26225
+ const resolveAxisYCanvasHorizontalLayout = ({ axisLineWidth, inside, width })=>{
26226
+ if (inside) return {
26227
+ axisX: axisLineWidth,
26228
+ majorTickEndX: MAJOR_TICK_LENGTH,
26229
+ majorTickStartX: 0,
26230
+ minorTickEndX: MINOR_TICK_LENGTH,
26231
+ minorTickStartX: 0,
26232
+ textAlign: 'left',
26233
+ textX: TEXT_OFFSET
26234
+ };
26235
+ return {
26236
+ axisX: width - axisLineWidth,
26237
+ majorTickEndX: width,
26238
+ majorTickStartX: width - MAJOR_TICK_LENGTH,
26239
+ minorTickEndX: width,
26240
+ minorTickStartX: width - MINOR_TICK_LENGTH,
26241
+ textAlign: 'right',
26242
+ textX: width - TEXT_OFFSET
26243
+ };
26244
+ };
26245
+ const LINE_WIDTH_BASE = 0.5;
26210
26246
  const MINOR_TICK_DIVISIONS = 2;
26211
26247
  const MIN_TICK_SPACING = 4;
26212
26248
  const MIN_CONTAINER_HEIGHT = 100;
@@ -26218,7 +26254,8 @@ const AXIS_LINE_WIDTH = LINE_WIDTH_BASE;
26218
26254
  function useCanvasAxisY(options) {
26219
26255
  const { ranging } = options;
26220
26256
  const axisY = useStore_useSelector((state)=>state.axisY);
26221
- const { range: axisYRange, disabled } = axisY;
26257
+ const { range: axisYRange, disabled, placement, show } = axisY;
26258
+ const inside = 'inside' === placement;
26222
26259
  const canvasRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
26223
26260
  const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
26224
26261
  const [containerHeight, setContainerHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
@@ -26263,7 +26300,9 @@ function useCanvasAxisY(options) {
26263
26300
  });
26264
26301
  resizeObserver.observe(container);
26265
26302
  return ()=>resizeObserver.disconnect();
26266
- }, []);
26303
+ }, [
26304
+ show
26305
+ ]);
26267
26306
  const formatTickLabel = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((value1, formatStrategy)=>{
26268
26307
  if (formatStrategy.useScientific) return value1.toExponential(1);
26269
26308
  if (formatStrategy.useKFormat) {
@@ -26360,6 +26399,11 @@ function useCanvasAxisY(options) {
26360
26399
  const rect = canvas.getBoundingClientRect();
26361
26400
  const width = rect.width;
26362
26401
  const height = containerHeight;
26402
+ const horizontalLayout = resolveAxisYCanvasHorizontalLayout({
26403
+ axisLineWidth: AXIS_LINE_WIDTH,
26404
+ inside,
26405
+ width
26406
+ });
26363
26407
  canvas.width = width * devicePixelRatio;
26364
26408
  canvas.height = height * devicePixelRatio;
26365
26409
  canvas.style.width = `${width}px`;
@@ -26369,18 +26413,18 @@ function useCanvasAxisY(options) {
26369
26413
  ctx.imageSmoothingQuality = 'high';
26370
26414
  ctx.clearRect(0, 0, width, height);
26371
26415
  ctx.font = '12px -apple-system, BlinkMacSystemFont, sans-serif';
26372
- ctx.textAlign = 'right';
26416
+ ctx.textAlign = horizontalLayout.textAlign;
26373
26417
  ctx.textBaseline = 'middle';
26374
26418
  ctx.lineWidth = MAJOR_TICK_LINE_WIDTH;
26375
26419
  const color = getThemeColor('--foreground', 0.5, containerRef.current);
26376
26420
  ticksData.majorTicks.forEach((tick)=>{
26377
26421
  ctx.fillStyle = color;
26378
26422
  ctx.strokeStyle = color;
26379
- ctx.fillText(tick.label, width - TEXT_OFFSET, tick.textPosition);
26423
+ ctx.fillText(tick.label, horizontalLayout.textX, tick.textPosition);
26380
26424
  ctx.beginPath();
26381
26425
  const tickY = alignToDevicePixel(clampTickPosition(tick.position, height, MAJOR_TICK_LINE_WIDTH), MAJOR_TICK_LINE_WIDTH);
26382
- ctx.moveTo(width - MAJOR_TICK_LENGTH, tickY);
26383
- ctx.lineTo(width, tickY);
26426
+ ctx.moveTo(horizontalLayout.majorTickStartX, tickY);
26427
+ ctx.lineTo(horizontalLayout.majorTickEndX, tickY);
26384
26428
  ctx.stroke();
26385
26429
  });
26386
26430
  ctx.strokeStyle = color;
@@ -26388,14 +26432,14 @@ function useCanvasAxisY(options) {
26388
26432
  ticksData.minorTicks.forEach((tick)=>{
26389
26433
  ctx.beginPath();
26390
26434
  const tickY = alignToDevicePixel(clampTickPosition(tick.position, height, MINOR_TICK_LINE_WIDTH), MINOR_TICK_LINE_WIDTH);
26391
- ctx.moveTo(width - MINOR_TICK_LENGTH, tickY);
26392
- ctx.lineTo(width, tickY);
26435
+ ctx.moveTo(horizontalLayout.minorTickStartX, tickY);
26436
+ ctx.lineTo(horizontalLayout.minorTickEndX, tickY);
26393
26437
  ctx.stroke();
26394
26438
  });
26395
26439
  ctx.strokeStyle = color;
26396
26440
  ctx.lineWidth = AXIS_LINE_WIDTH;
26397
26441
  ctx.beginPath();
26398
- const axisX = alignToDevicePixel(width - AXIS_LINE_WIDTH, AXIS_LINE_WIDTH);
26442
+ const axisX = alignToDevicePixel(horizontalLayout.axisX, AXIS_LINE_WIDTH);
26399
26443
  ctx.moveTo(axisX, 0);
26400
26444
  ctx.lineTo(axisX, height);
26401
26445
  ctx.stroke();
@@ -26403,13 +26447,15 @@ function useCanvasAxisY(options) {
26403
26447
  ticksData,
26404
26448
  containerHeight,
26405
26449
  devicePixelRatio,
26450
+ inside,
26406
26451
  alignToDevicePixel,
26407
26452
  clampTickPosition
26408
26453
  ]);
26409
26454
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
26410
- drawAxis();
26455
+ if (false !== show) drawAxis();
26411
26456
  }, [
26412
- drawAxis
26457
+ drawAxis,
26458
+ show
26413
26459
  ]);
26414
26460
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>subscribeChartsThemeChange(()=>{
26415
26461
  drawAxis();
@@ -26479,14 +26525,14 @@ function AxisYCanvas(props) {
26479
26525
  const ranging = spectrum_useRanging({
26480
26526
  chart
26481
26527
  });
26482
- const { axisYWidth, marginLeft } = useAxisYWidth_useAxisYWidth();
26528
+ const { axisYWidth, inside, marginLeft } = useAxisYWidth_useAxisYWidth();
26483
26529
  const { canvasRef, containerRef, isDragging, handleMouseDown, handleMouseMove, handleMouseUp, handleMouseLeave, handleWheel } = useCanvasAxisY({
26484
26530
  ranging
26485
26531
  });
26486
26532
  if (false === show) return null;
26487
26533
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
26488
26534
  ref: containerRef,
26489
- className: cn_cn('relative h-full select-none', isDragging ? 'cursor-grabbing' : 'cursor-ns-resize'),
26535
+ className: cn_cn('h-full select-none', inside ? 'absolute left-0 top-0 z-[7]' : 'relative', isDragging ? 'cursor-grabbing' : 'cursor-ns-resize'),
26490
26536
  style: {
26491
26537
  width: axisYWidth,
26492
26538
  marginLeft
@@ -29991,7 +30037,7 @@ const BandLayer_BandLayer = ()=>{
29991
30037
  style: {
29992
30038
  left: `${position.left}%`,
29993
30039
  width: `${position.width}%`,
29994
- backgroundColor: band.color ? `${band.color}15` : void 0,
30040
+ backgroundColor: band.color ? `${band.color}40` : void 0,
29995
30041
  borderColor: band.color
29996
30042
  }
29997
30043
  }, position.key))
@@ -30125,7 +30171,7 @@ const LevelStream_Chart_Chart = (props)=>{
30125
30171
  ]);
30126
30172
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
30127
30173
  children: [
30128
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
30174
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30129
30175
  type: constants_ChartType.LevelStream
30130
30176
  }),
30131
30177
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
@@ -30362,7 +30408,7 @@ const Occupancy_Chart_Chart = (props)=>{
30362
30408
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
30363
30409
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {})
30364
30410
  }),
30365
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
30411
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
30366
30412
  type: constants_ChartType.Scan
30367
30413
  })
30368
30414
  ]
@@ -30530,11 +30576,11 @@ const HeatmapPortal_Chart = (props)=>{
30530
30576
  id: heatmapElementID,
30531
30577
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
30532
30578
  children: [
30533
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
30579
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30534
30580
  type: constants_ChartType.Heatmap
30535
30581
  }),
30536
30582
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
30537
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
30583
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
30538
30584
  type: type
30539
30585
  })
30540
30586
  ]
@@ -30553,11 +30599,11 @@ const OccupancyPortal_Chart = (props)=>{
30553
30599
  occupancyAxisYDisabled: true
30554
30600
  }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
30555
30601
  children: [
30556
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
30602
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30557
30603
  type: constants_ChartType.Occupancy
30558
30604
  }),
30559
30605
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
30560
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
30606
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
30561
30607
  type: type
30562
30608
  })
30563
30609
  ]
@@ -30973,7 +31019,7 @@ const Spectrum_Chart_Chart = (props)=>{
30973
31019
  });
30974
31020
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
30975
31021
  children: [
30976
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
31022
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30977
31023
  type: type
30978
31024
  }),
30979
31025
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_FlexBox, {
@@ -31004,7 +31050,7 @@ const Spectrum_Chart_Chart = (props)=>{
31004
31050
  })
31005
31051
  ]
31006
31052
  }),
31007
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
31053
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
31008
31054
  type: type
31009
31055
  })
31010
31056
  ]
@@ -31052,4 +31098,4 @@ function initChartsTheme(options = {}) {
31052
31098
  };
31053
31099
  }
31054
31100
  initializeChartsThemeEnvironment();
31055
- export { constants_ChartType as ChartType, charts_Dial as Dial, constants_FrequencyUnit as FrequencyUnit, charts_Gauge as Gauge, charts_Heatmap as Heatmap, heatmap_HeatmapCaptureType as HeatmapCaptureType, IQ, LevelStream, constants_MarkerEventType as MarkerEventType, marker_MarkerMode as MarkerMode, constants_ModuleType as ModuleType, charts_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, signal_SignalDataType as SignalDataType, charts_Spectrum as Spectrum, constants_ToolType as ToolType, constants_ToolbarItemType as ToolbarItemType, formatFrequencyUnit, formatFrequencyUnitFromHz, formatFrequencyUnitFromMHz, getChartsThemeState, initChartsTheme, setFrequencyAllocationChannelsToCache, setFrequencyAllocationToCache, subscribeChartsThemeChange, useSafePublish, withChartPublisher };
31101
+ export { constants_AxisPlacement as AxisPlacement, constants_ChartType as ChartType, charts_Dial as Dial, constants_FrequencyUnit as FrequencyUnit, charts_Gauge as Gauge, charts_Heatmap as Heatmap, heatmap_HeatmapCaptureType as HeatmapCaptureType, IQ, LevelStream, constants_MarkerEventType as MarkerEventType, marker_MarkerMode as MarkerMode, constants_ModuleType as ModuleType, charts_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, signal_SignalDataType as SignalDataType, charts_Spectrum as Spectrum, constants_ToolType as ToolType, constants_ToolbarItemType as ToolbarItemType, formatFrequencyUnit, formatFrequencyUnitFromHz, formatFrequencyUnitFromMHz, getChartsThemeState, initChartsTheme, setFrequencyAllocationChannelsToCache, setFrequencyAllocationToCache, subscribeChartsThemeChange, useSafePublish, withChartPublisher };
@@ -0,0 +1,23 @@
1
+ interface AxisYCanvasHorizontalLayoutOptions {
2
+ axisLineWidth: number;
3
+ inside: boolean;
4
+ width: number;
5
+ }
6
+ export declare const resolveAxisYCanvasHorizontalLayout: ({ axisLineWidth, inside, width }: AxisYCanvasHorizontalLayoutOptions) => {
7
+ axisX: number;
8
+ majorTickEndX: number;
9
+ majorTickStartX: number;
10
+ minorTickEndX: number;
11
+ minorTickStartX: number;
12
+ textAlign: "left";
13
+ textX: number;
14
+ } | {
15
+ axisX: number;
16
+ majorTickEndX: number;
17
+ majorTickStartX: number;
18
+ minorTickEndX: number;
19
+ minorTickStartX: number;
20
+ textAlign: "right";
21
+ textX: number;
22
+ };
23
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rfkit/charts",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "type": "module",
5
5
  "description": "Chart components for wireless monitoring web applications",
6
6
  "exports": {
@@ -1,6 +1,8 @@
1
+ import type { AxisPlacement } from '../../config';
1
2
  import type { AxisYRange, RecursiveObject } from '..';
2
3
  export interface AxisYProps {
3
4
  show?: boolean;
5
+ placement?: AxisPlacement;
4
6
  disabled?: boolean;
5
7
  gradientRibbon?: boolean;
6
8
  realRange?: number[];