@rfkit/charts 1.7.0 → 1.8.0

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 } = 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);
@@ -26360,6 +26397,11 @@ function useCanvasAxisY(options) {
26360
26397
  const rect = canvas.getBoundingClientRect();
26361
26398
  const width = rect.width;
26362
26399
  const height = containerHeight;
26400
+ const horizontalLayout = resolveAxisYCanvasHorizontalLayout({
26401
+ axisLineWidth: AXIS_LINE_WIDTH,
26402
+ inside,
26403
+ width
26404
+ });
26363
26405
  canvas.width = width * devicePixelRatio;
26364
26406
  canvas.height = height * devicePixelRatio;
26365
26407
  canvas.style.width = `${width}px`;
@@ -26369,18 +26411,18 @@ function useCanvasAxisY(options) {
26369
26411
  ctx.imageSmoothingQuality = 'high';
26370
26412
  ctx.clearRect(0, 0, width, height);
26371
26413
  ctx.font = '12px -apple-system, BlinkMacSystemFont, sans-serif';
26372
- ctx.textAlign = 'right';
26414
+ ctx.textAlign = horizontalLayout.textAlign;
26373
26415
  ctx.textBaseline = 'middle';
26374
26416
  ctx.lineWidth = MAJOR_TICK_LINE_WIDTH;
26375
26417
  const color = getThemeColor('--foreground', 0.5, containerRef.current);
26376
26418
  ticksData.majorTicks.forEach((tick)=>{
26377
26419
  ctx.fillStyle = color;
26378
26420
  ctx.strokeStyle = color;
26379
- ctx.fillText(tick.label, width - TEXT_OFFSET, tick.textPosition);
26421
+ ctx.fillText(tick.label, horizontalLayout.textX, tick.textPosition);
26380
26422
  ctx.beginPath();
26381
26423
  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);
26424
+ ctx.moveTo(horizontalLayout.majorTickStartX, tickY);
26425
+ ctx.lineTo(horizontalLayout.majorTickEndX, tickY);
26384
26426
  ctx.stroke();
26385
26427
  });
26386
26428
  ctx.strokeStyle = color;
@@ -26388,14 +26430,14 @@ function useCanvasAxisY(options) {
26388
26430
  ticksData.minorTicks.forEach((tick)=>{
26389
26431
  ctx.beginPath();
26390
26432
  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);
26433
+ ctx.moveTo(horizontalLayout.minorTickStartX, tickY);
26434
+ ctx.lineTo(horizontalLayout.minorTickEndX, tickY);
26393
26435
  ctx.stroke();
26394
26436
  });
26395
26437
  ctx.strokeStyle = color;
26396
26438
  ctx.lineWidth = AXIS_LINE_WIDTH;
26397
26439
  ctx.beginPath();
26398
- const axisX = alignToDevicePixel(width - AXIS_LINE_WIDTH, AXIS_LINE_WIDTH);
26440
+ const axisX = alignToDevicePixel(horizontalLayout.axisX, AXIS_LINE_WIDTH);
26399
26441
  ctx.moveTo(axisX, 0);
26400
26442
  ctx.lineTo(axisX, height);
26401
26443
  ctx.stroke();
@@ -26403,6 +26445,7 @@ function useCanvasAxisY(options) {
26403
26445
  ticksData,
26404
26446
  containerHeight,
26405
26447
  devicePixelRatio,
26448
+ inside,
26406
26449
  alignToDevicePixel,
26407
26450
  clampTickPosition
26408
26451
  ]);
@@ -26479,14 +26522,14 @@ function AxisYCanvas(props) {
26479
26522
  const ranging = spectrum_useRanging({
26480
26523
  chart
26481
26524
  });
26482
- const { axisYWidth, marginLeft } = useAxisYWidth_useAxisYWidth();
26525
+ const { axisYWidth, inside, marginLeft } = useAxisYWidth_useAxisYWidth();
26483
26526
  const { canvasRef, containerRef, isDragging, handleMouseDown, handleMouseMove, handleMouseUp, handleMouseLeave, handleWheel } = useCanvasAxisY({
26484
26527
  ranging
26485
26528
  });
26486
26529
  if (false === show) return null;
26487
26530
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
26488
26531
  ref: containerRef,
26489
- className: cn_cn('relative h-full select-none', isDragging ? 'cursor-grabbing' : 'cursor-ns-resize'),
26532
+ className: cn_cn('h-full select-none', inside ? 'absolute left-0 top-0 z-[7]' : 'relative', isDragging ? 'cursor-grabbing' : 'cursor-ns-resize'),
26490
26533
  style: {
26491
26534
  width: axisYWidth,
26492
26535
  marginLeft
@@ -29991,7 +30034,7 @@ const BandLayer_BandLayer = ()=>{
29991
30034
  style: {
29992
30035
  left: `${position.left}%`,
29993
30036
  width: `${position.width}%`,
29994
- backgroundColor: band.color ? `${band.color}15` : void 0,
30037
+ backgroundColor: band.color ? `${band.color}40` : void 0,
29995
30038
  borderColor: band.color
29996
30039
  }
29997
30040
  }, position.key))
@@ -30125,7 +30168,7 @@ const LevelStream_Chart_Chart = (props)=>{
30125
30168
  ]);
30126
30169
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
30127
30170
  children: [
30128
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
30171
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30129
30172
  type: constants_ChartType.LevelStream
30130
30173
  }),
30131
30174
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
@@ -30362,7 +30405,7 @@ const Occupancy_Chart_Chart = (props)=>{
30362
30405
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
30363
30406
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {})
30364
30407
  }),
30365
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
30408
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
30366
30409
  type: constants_ChartType.Scan
30367
30410
  })
30368
30411
  ]
@@ -30530,11 +30573,11 @@ const HeatmapPortal_Chart = (props)=>{
30530
30573
  id: heatmapElementID,
30531
30574
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
30532
30575
  children: [
30533
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
30576
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30534
30577
  type: constants_ChartType.Heatmap
30535
30578
  }),
30536
30579
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
30537
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
30580
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
30538
30581
  type: type
30539
30582
  })
30540
30583
  ]
@@ -30553,11 +30596,11 @@ const OccupancyPortal_Chart = (props)=>{
30553
30596
  occupancyAxisYDisabled: true
30554
30597
  }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
30555
30598
  children: [
30556
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
30599
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30557
30600
  type: constants_ChartType.Occupancy
30558
30601
  }),
30559
30602
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
30560
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
30603
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
30561
30604
  type: type
30562
30605
  })
30563
30606
  ]
@@ -30973,7 +31016,7 @@ const Spectrum_Chart_Chart = (props)=>{
30973
31016
  });
30974
31017
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
30975
31018
  children: [
30976
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
31019
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Toolbar, {
30977
31020
  type: type
30978
31021
  }),
30979
31022
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_FlexBox, {
@@ -31004,7 +31047,7 @@ const Spectrum_Chart_Chart = (props)=>{
31004
31047
  })
31005
31048
  ]
31006
31049
  }),
31007
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
31050
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
31008
31051
  type: type
31009
31052
  })
31010
31053
  ]
@@ -31052,4 +31095,4 @@ function initChartsTheme(options = {}) {
31052
31095
  };
31053
31096
  }
31054
31097
  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 };
31098
+ 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.0",
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[];