scichart 2.0.2146 → 2.0.2179
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/Builder/buildAnnotations.js +11 -10
- package/Builder/buildAxis.js +7 -6
- package/Builder/buildDataSeries.js +3 -6
- package/Builder/buildModifiers.js +17 -16
- package/Builder/buildSeries.js +21 -20
- package/Builder/buildSurface.js +29 -27
- package/Builder/chartBuilder.d.ts +10 -162
- package/Builder/chartBuilder.js +9 -6
- package/Builder/classFactory.js +12 -6
- package/Charting/ChartModifiers/ChartModifierBase.js +1 -1
- package/Charting/ChartModifiers/ChartModifierBase2D.d.ts +1 -1
- package/Charting/ChartModifiers/ChartModifierBase2D.js +11 -6
- package/Charting/ChartModifiers/CursorModifier.d.ts +1 -1
- package/Charting/ChartModifiers/CursorModifier.js +32 -28
- package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +1 -1
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +18 -16
- package/Charting/ChartModifiers/LegendModifier.d.ts +1 -1
- package/Charting/ChartModifiers/LegendModifier.js +3 -1
- package/Charting/ChartModifiers/ModifierMouseArgs.js +4 -3
- package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +52 -2
- package/Charting/ChartModifiers/MouseWheelZoomModifier.js +105 -10
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +10 -8
- package/Charting/ChartModifiers/PinchZoomModifier.d.ts +1 -1
- package/Charting/ChartModifiers/PinchZoomModifier.js +4 -2
- package/Charting/ChartModifiers/RolloverModifier.d.ts +1 -1
- package/Charting/ChartModifiers/RolloverModifier.js +27 -20
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +1 -1
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +11 -9
- package/Charting/ChartModifiers/SeriesSelectionModifier.d.ts +1 -1
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +9 -7
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/XAxisDragModifier.js +12 -10
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/YAxisDragModifier.js +12 -10
- package/Charting/ChartModifiers/ZoomExtentsModifier.d.ts +17 -1
- package/Charting/ChartModifiers/ZoomExtentsModifier.js +65 -10
- package/Charting/ChartModifiers/ZoomPanModifier.d.ts +4 -2
- package/Charting/ChartModifiers/ZoomPanModifier.js +25 -21
- package/Charting/Drawing/BaseCache.js +2 -2
- package/Charting/Drawing/BrushCache.js +12 -7
- package/Charting/Drawing/PaletteCache.js +4 -2
- package/Charting/Drawing/Pen2DCache.js +14 -9
- package/Charting/Drawing/SolidBrushCache.js +2 -2
- package/Charting/Drawing/TextureCache.js +4 -2
- package/Charting/Drawing/WebGlBrush.js +1 -1
- package/Charting/Drawing/WebGlPen.js +2 -2
- package/Charting/Drawing/WebGlRenderContext2D.js +5 -5
- package/Charting/LayoutManager/AxisLayoutHelpers.js +6 -4
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +4 -4
- package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.d.ts +1 -1
- package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +3 -1
- package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/BottomAlignedOuterAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +7 -5
- package/Charting/LayoutManager/CentralAxesLayoutManager.js +7 -3
- package/Charting/LayoutManager/LayoutManager.js +2 -2
- package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/LeftAlignedOuterAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +7 -5
- package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/RightAlignedOuterAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +7 -5
- package/Charting/LayoutManager/SynchronizedLayoutManager.js +4 -2
- package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/TopAlignedOuterAxisLayoutStrategy.js +6 -4
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +7 -5
- package/Charting/Model/BaseDataSeries.js +23 -20
- package/Charting/Model/BaseHeatmapDataSeries.js +5 -5
- package/Charting/Model/ChartData/HeatmapSeriesInfo.js +4 -2
- package/Charting/Model/ChartData/OhlcSeriesInfo.js +3 -1
- package/Charting/Model/ChartData/SeriesInfo.d.ts +1 -0
- package/Charting/Model/ChartData/SeriesInfo.js +15 -0
- package/Charting/Model/ChartData/StackedXySeriesInfo.js +3 -1
- package/Charting/Model/ChartData/XySeriesInfo.js +3 -1
- package/Charting/Model/ChartData/XyySeriesInfo.js +3 -1
- package/Charting/Model/DataPointSelectionPaletteProvider.js +2 -2
- package/Charting/Model/Filters/OhlcCustomFilter.js +7 -2
- package/Charting/Model/Filters/OhlcFilterBase.js +3 -1
- package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +3 -1
- package/Charting/Model/Filters/XyCustomFilter.js +3 -1
- package/Charting/Model/Filters/XyFilterBase.js +9 -6
- package/Charting/Model/Filters/XyLinearTrendFilter.js +3 -1
- package/Charting/Model/Filters/XyMovingAverageFilter.js +3 -1
- package/Charting/Model/Filters/XyRatioFilter.js +6 -4
- package/Charting/Model/Filters/XyScaleOffsetFilter.js +3 -1
- package/Charting/Model/Filters/XyyCustomFilter.js +3 -1
- package/Charting/Model/Filters/XyyFilterBase.js +7 -5
- package/Charting/Model/Filters/XyyScaleOffsetFilter.js +3 -1
- package/Charting/Model/Filters/XyzCustomFilter.js +3 -1
- package/Charting/Model/Filters/XyzFilterBase.js +7 -5
- package/Charting/Model/Filters/XyzScaleOffsetFilter.js +3 -1
- package/Charting/Model/OhlcDataSeries.js +27 -25
- package/Charting/Model/PaletteFactory.js +3 -3
- package/Charting/Model/UniformHeatmapDataSeries.js +3 -1
- package/Charting/Model/XyDataSeries.js +9 -7
- package/Charting/Model/XyyDataSeries.js +15 -13
- package/Charting/Model/XyzDataSeries.js +15 -13
- package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.js +3 -1
- package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.js +3 -1
- package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +3 -1
- package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.js +3 -1
- package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +3 -1
- package/Charting/Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider.js +3 -1
- package/Charting/Numerics/TickProviders/LogarithmicTickProvider.js +7 -5
- package/Charting/Numerics/TickProviders/NumericTickProvider.js +4 -2
- package/Charting/Services/SciChartRenderer.js +20 -17
- package/Charting/Services/Workers/TextureWorker.d.ts +16 -0
- package/Charting/Services/Workers/TextureWorker.js +138 -0
- package/Charting/Services/Workers/TextureWorkerSource.d.ts +1 -0
- package/Charting/Services/Workers/TextureWorkerSource.js +133 -0
- package/Charting/Themes/SciChartJSDarkTheme.js +3 -1
- package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -1
- package/Charting/Themes/SciChartJSLightTheme.js +3 -1
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +1 -1
- package/Charting/Visuals/Annotations/AnnotationBase.js +71 -41
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +28 -1
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +11 -9
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/BoxAnnotation.js +18 -16
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +32 -13
- package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -1
- package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +8 -6
- package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/LineAnnotation.js +21 -17
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +20 -17
- package/Charting/Visuals/Annotations/RenderContextAnnotationBase.js +3 -1
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +3 -1
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +4 -2
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +17 -15
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +1 -1
- package/Charting/Visuals/Annotations/SvgAnnotationBase.js +23 -13
- package/Charting/Visuals/Annotations/TextAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/TextAnnotation.js +4 -2
- package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +8 -6
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +16 -8
- package/Charting/Visuals/Axis/AxisBase2D.js +68 -37
- package/Charting/Visuals/Axis/AxisCore.d.ts +1 -1
- package/Charting/Visuals/Axis/AxisCore.js +3 -33
- package/Charting/Visuals/Axis/AxisRenderer.d.ts +63 -0
- package/Charting/Visuals/Axis/AxisRenderer.js +92 -16
- package/Charting/Visuals/Axis/AxisTitleRenderer.js +7 -3
- package/Charting/Visuals/Axis/CategoryAxis.js +5 -2
- package/Charting/Visuals/Axis/CategoryAxisBase.js +10 -8
- package/Charting/Visuals/Axis/DeltaCalculator/CategoryDeltaCalculator.js +3 -1
- package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.js +3 -1
- package/Charting/Visuals/Axis/DeltaCalculator/NumericDeltaCalculator.js +3 -1
- package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +5 -3
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.d.ts +41 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +164 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +1 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +57 -7
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +171 -74
- package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +5 -3
- package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +5 -3
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +30 -37
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +5 -2
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +86 -5
- package/Charting/Visuals/Axis/LogarithmicAxis.js +8 -3
- package/Charting/Visuals/Axis/NumericAxis.js +5 -2
- package/Charting/Visuals/Axis/getAxisById.js +1 -1
- package/Charting/Visuals/Helpers/createNativeRect.js +2 -1
- package/Charting/Visuals/Helpers/createPen.js +4 -3
- package/Charting/Visuals/Helpers/createSolidBrush.js +5 -4
- package/Charting/Visuals/Helpers/drawBorder.js +6 -5
- package/Charting/Visuals/Helpers/drawLabel.js +10 -6
- package/Charting/Visuals/Legend/SciChartLegend.js +4 -2
- package/Charting/Visuals/Legend/SciChartLegendBase.js +16 -14
- package/Charting/Visuals/Legend/SciChartPieLegend.js +6 -4
- package/Charting/Visuals/PointMarkers/BasePointMarker.js +3 -3
- package/Charting/Visuals/PointMarkers/CrossPointMarker.js +3 -1
- package/Charting/Visuals/PointMarkers/EllipsePointMarker.js +3 -1
- package/Charting/Visuals/PointMarkers/SpritePointMarker.js +3 -1
- package/Charting/Visuals/PointMarkers/SquarePointMarker.js +3 -1
- package/Charting/Visuals/PointMarkers/TrianglePointMarker.js +3 -1
- package/Charting/Visuals/PointMarkers/XPointMarker.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +6 -4
- package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +6 -4
- package/Charting/Visuals/RenderableSeries/Animations/BaseAnimationStyle.js +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +5 -3
- package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +5 -3
- package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +4 -2
- package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +4 -2
- package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +4 -2
- package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +4 -2
- package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +5 -3
- package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +5 -3
- package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +5 -3
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
- package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +3 -1
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +15 -14
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +7 -5
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +3 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +20 -18
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +12 -12
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +4 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +12 -10
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +9 -7
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +10 -8
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +20 -18
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +6 -4
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +9 -7
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +6 -4
- package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +6 -3
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/GlowEffect.js +3 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +3 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +4 -2
- package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +4 -2
- package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +8 -6
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +3 -1
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +4 -2
- package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +6 -4
- package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +7 -5
- package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +3 -1
- package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +3 -1
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +12 -12
- package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +2 -2
- package/Charting/Visuals/RenderableSeries/ShaderEffect.js +4 -4
- package/Charting/Visuals/RenderableSeries/ShadowEffect.js +4 -2
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +6 -4
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +5 -3
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +5 -3
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +6 -4
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +11 -9
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +7 -5
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +11 -9
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -4
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +5 -2
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +3 -1
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
- package/Charting/Visuals/SciChartDefaults.d.ts +11 -0
- package/Charting/Visuals/SciChartDefaults.js +18 -0
- package/Charting/Visuals/SciChartOverview.js +13 -7
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +1 -1
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +27 -24
- package/Charting/Visuals/SciChartSurface.js +20 -17
- package/Charting/Visuals/SciChartSurfaceBase.js +15 -11
- package/Charting/Visuals/TextureManager/CanvasTexture.js +5 -5
- package/Charting/Visuals/TextureManager/DpiHelper.js +3 -3
- package/Charting/Visuals/TextureManager/TextureManager.d.ts +1 -0
- package/Charting/Visuals/TextureManager/TextureManager.js +16 -12
- package/Charting/Visuals/createMaster.js +6 -5
- package/Charting/Visuals/createSingle.js +6 -4
- package/Charting/Visuals/licenseManager2D.js +65 -48
- package/Charting/Visuals/loader.js +1 -1
- package/Charting/Visuals/sciChartInitCommon.js +12 -12
- package/Charting3D/CameraController.js +6 -6
- package/Charting3D/ChartModifiers/ChartModifierBase3D.js +3 -1
- package/Charting3D/ChartModifiers/MouseWheelZoomModifier3D.js +3 -1
- package/Charting3D/ChartModifiers/OrbitModifier3D.js +3 -1
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +79 -0
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +143 -0
- package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.js +4 -2
- package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.js +3 -1
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +6 -4
- package/Charting3D/Vector3.js +1 -1
- package/Charting3D/Visuals/Axis/AxisBase3D.js +9 -7
- package/Charting3D/Visuals/Axis/AxisCubeEntity.js +20 -15
- package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +5 -0
- package/Charting3D/Visuals/Axis/NumericAxis3D.js +29 -1
- package/Charting3D/Visuals/DefaultViewportManager3D.js +3 -1
- package/Charting3D/Visuals/GizmoEntity.js +3 -1
- package/Charting3D/Visuals/PointMarkers/BaseMeshPointMarker3D.js +3 -1
- package/Charting3D/Visuals/PointMarkers/BaseTexturePointMarker3D.js +3 -1
- package/Charting3D/Visuals/PointMarkers/DefaultPointMarkers.js +3 -1
- package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +2 -2
- package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.js +3 -1
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -5
- package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +22 -20
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -3
- package/Charting3D/Visuals/RenderableSeries/ScatterRenderableSeries3D.js +3 -1
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/GradientColorPalette.js +3 -1
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SolidColorBrushPalette.js +5 -3
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +3 -1
- package/Charting3D/Visuals/RootSceneEntity.js +3 -1
- package/Charting3D/Visuals/SciChart3DRenderer.d.ts +1 -0
- package/Charting3D/Visuals/SciChart3DRenderer.js +10 -2
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +22 -0
- package/Charting3D/Visuals/SciChart3DSurface.js +64 -11
- package/Charting3D/Visuals/createMaster3d.js +8 -7
- package/Charting3D/Visuals/createSingle3d.js +5 -4
- package/Charting3D/Visuals/licenseManager3D.js +7 -6
- package/Core/Animations/AnimationFiniteStateMachine.js +4 -2
- package/Core/Animations/DoubleAnimator.js +1 -1
- package/Core/Animations/GenericAnimation.js +1 -1
- package/Core/Guard.js +4 -4
- package/Core/Mouse/MouseManager.js +1 -1
- package/Core/NumberRange.js +4 -4
- package/Core/Point.js +1 -1
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +95 -95
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +95 -95
- package/_wasm/scichart3d.wasm +0 -0
- package/index.js +1 -0
- package/package.json +2 -2
- package/types/AxisAlignment.js +6 -4
- package/types/ChartModifierType.d.ts +2 -1
- package/types/ChartModifierType.js +1 -0
- package/utils/array.js +2 -1
- package/utils/calcAverage.js +4 -2
- package/utils/colorUtil.js +4 -4
- package/utils/convertColor.js +6 -4
- package/utils/convertToPixel.js +2 -1
- package/utils/date.js +26 -17
- package/utils/font.js +4 -3
- package/utils/guid.js +2 -1
- package/utils/hasAllProperties.js +2 -1
- package/utils/includedAxis.d.ts +3 -0
- package/utils/includedAxis.js +23 -0
- package/utils/math.js +6 -3
- package/utils/number.js +18 -13
- package/utils/parseColor.js +7 -5
- package/utils/pointUtil.js +24 -15
- package/utils/random.js +2 -1
- package/utils/randomPricesDataSource.js +7 -5
- package/utils/svgString.js +2 -1
- package/utils/translate.js +10 -5
- package/utils/tsrExtensions.js +4 -2
- package/utils/zeroArray2D.js +3 -2
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -43,11 +45,11 @@ var NumericLabelProvider = /** @class */ (function (_super) {
|
|
|
43
45
|
var _this = _super.call(this, __assign({ labelFormat: (_a = options === null || options === void 0 ? void 0 : options.labelFormat) !== null && _a !== void 0 ? _a : NumericFormat_1.ENumericFormat.Decimal, labelPrecision: (_b = options === null || options === void 0 ? void 0 : options.labelPrecision) !== null && _b !== void 0 ? _b : 1 }, options)) || this;
|
|
44
46
|
_this.type = LabelProviderType_1.ELabelProviderType.Numeric;
|
|
45
47
|
_this.formatLabelProperty = function (dataValue) {
|
|
46
|
-
return _this.applyFormat(number_1.formatNumber(dataValue, _this.numericFormat, _this.precision));
|
|
48
|
+
return _this.applyFormat((0, number_1.formatNumber)(dataValue, _this.numericFormat, _this.precision));
|
|
47
49
|
};
|
|
48
50
|
_this.formatCursorLabelProperty = function (dataValue) {
|
|
49
51
|
var _a, _b;
|
|
50
|
-
return _this.applyFormat(number_1.formatNumber(dataValue, (_a = _this.cursorNumericFormat) !== null && _a !== void 0 ? _a : _this.numericFormat, (_b = _this.cursorPrecision) !== null && _b !== void 0 ? _b : _this.precision));
|
|
52
|
+
return _this.applyFormat((0, number_1.formatNumber)(dataValue, (_a = _this.cursorNumericFormat) !== null && _a !== void 0 ? _a : _this.numericFormat, (_b = _this.cursorPrecision) !== null && _b !== void 0 ? _b : _this.precision));
|
|
51
53
|
};
|
|
52
54
|
return _this;
|
|
53
55
|
}
|
|
@@ -3,32 +3,24 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
|
-
var __assign = (this && this.__assign) || function () {
|
|
16
|
-
__assign = Object.assign || function(t) {
|
|
17
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
-
s = arguments[i];
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
return __assign.apply(this, arguments);
|
|
25
|
-
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
18
|
exports.SmartDateLabelProvider = void 0;
|
|
28
19
|
var LabelProviderType_1 = require("../../../../types/LabelProviderType");
|
|
29
20
|
var NumericFormat_1 = require("../../../../types/NumericFormat");
|
|
30
21
|
var date_1 = require("../../../../utils/date");
|
|
31
22
|
var number_1 = require("../../../../utils/number");
|
|
23
|
+
var LabelCache_1 = require("./LabelCache");
|
|
32
24
|
var LabelProviderBase2D_1 = require("./LabelProviderBase2D");
|
|
33
25
|
var ETradeChartLabelFormat;
|
|
34
26
|
(function (ETradeChartLabelFormat) {
|
|
@@ -52,7 +44,7 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
|
|
|
52
44
|
function SmartDateLabelProvider() {
|
|
53
45
|
var _this = _super.call(this) || this;
|
|
54
46
|
_this.type = LabelProviderType_1.ELabelProviderType.SmartDate;
|
|
55
|
-
_this.formatLabelProperty = function (dataValue) { return number_1.formatNumber(dataValue, NumericFormat_1.ENumericFormat.Date_DDMMYYYY, 0); };
|
|
47
|
+
_this.formatLabelProperty = function (dataValue) { return (0, number_1.formatNumber)(dataValue, NumericFormat_1.ENumericFormat.Date_DDMMYYYY, 0); };
|
|
56
48
|
_this.formatCursorLabelProperty = _this.formatLabelProperty;
|
|
57
49
|
return _this;
|
|
58
50
|
}
|
|
@@ -77,26 +69,27 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
|
|
|
77
69
|
var format = this.getTradeChartLabelFormat(timeRange, ticksNumber);
|
|
78
70
|
for (var index = 0; index < ticks.length; index++) {
|
|
79
71
|
var tick = ticks[index];
|
|
72
|
+
var prevValue = index > 0 ? ticks[index - 1] : undefined;
|
|
73
|
+
var prevPrevValue = index > 0 ? ticks[index - 2] : undefined;
|
|
74
|
+
var text = this.formatTradeChartLabel(format, tick, prevValue, prevPrevValue);
|
|
80
75
|
var cachedLabelText = this.tickToText.get(tick);
|
|
81
76
|
var cachedLabel = void 0;
|
|
82
|
-
if (cachedLabelText) {
|
|
83
|
-
cachedLabel =
|
|
77
|
+
if (cachedLabelText && cachedLabelText === text) {
|
|
78
|
+
cachedLabel = LabelCache_1.labelCache.getLabel(cachedLabelText, this.styleId);
|
|
84
79
|
labels.push(cachedLabelText);
|
|
85
|
-
cachedLabel.lastUsed = Date.now();
|
|
86
80
|
}
|
|
87
81
|
else {
|
|
88
|
-
var prevValue = index > 0 ? ticks[index - 1] : undefined;
|
|
89
|
-
var prevPrevValue = index > 0 ? ticks[index - 2] : undefined;
|
|
90
|
-
var text = this.formatTradeChartLabel(format, tick, prevValue, prevPrevValue);
|
|
91
|
-
var axis = this.parentAxis;
|
|
92
|
-
var texture = this.getLabelTexture(text, axis.axisRenderer.textureManager, axis.dpiAdjustedLabelStyle);
|
|
93
|
-
cachedLabel = __assign(__assign({ tick: tick, text: text }, texture), { lastUsed: Date.now() });
|
|
94
82
|
this.tickToText.set(tick, text);
|
|
95
|
-
this.
|
|
83
|
+
var axis = this.parentAxis;
|
|
84
|
+
var texture = this.getCachedLabelTexture(text, axis.axisRenderer.textureManager, axis.dpiAdjustedLabelStyle);
|
|
85
|
+
if (!texture.textureWidth) {
|
|
86
|
+
cachedLabel = new LabelProviderBase2D_1.LabelInfo(tick, text, texture.bitmapTexture, texture.textureHeight, texture.textureWidth);
|
|
87
|
+
LabelCache_1.labelCache.setLabel(text, this.styleId, cachedLabel);
|
|
88
|
+
}
|
|
96
89
|
labels.push(text);
|
|
97
90
|
}
|
|
98
91
|
}
|
|
99
|
-
|
|
92
|
+
LabelCache_1.labelCache.pruneCache();
|
|
100
93
|
return labels;
|
|
101
94
|
};
|
|
102
95
|
Object.defineProperty(SmartDateLabelProvider.prototype, "numericFormat", {
|
|
@@ -124,38 +117,38 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
|
|
|
124
117
|
};
|
|
125
118
|
SmartDateLabelProvider.prototype.formatTradeChartLabel = function (tradeChartLabelFormat, value, prevValue, prevPrevValue) {
|
|
126
119
|
if (tradeChartLabelFormat === ETradeChartLabelFormat.Minutes) {
|
|
127
|
-
var newDate = !prevValue || date_1.formatUnixDateToHumanStringMMMDD(value) !== date_1.formatUnixDateToHumanStringMMMDD(prevValue);
|
|
120
|
+
var newDate = !prevValue || (0, date_1.formatUnixDateToHumanStringMMMDD)(value) !== (0, date_1.formatUnixDateToHumanStringMMMDD)(prevValue);
|
|
128
121
|
if (newDate) {
|
|
129
|
-
return date_1.formatUnixDateToHumanStringMMMDD(value);
|
|
122
|
+
return (0, date_1.formatUnixDateToHumanStringMMMDD)(value);
|
|
130
123
|
}
|
|
131
124
|
else {
|
|
132
|
-
return date_1.formatUnixDateToHumanStringHHMM(value);
|
|
125
|
+
return (0, date_1.formatUnixDateToHumanStringHHMM)(value);
|
|
133
126
|
}
|
|
134
127
|
}
|
|
135
128
|
else if (tradeChartLabelFormat === ETradeChartLabelFormat.Days) {
|
|
136
|
-
var newMonth = !prevValue || date_1.formatUnixDateToHumanStringMMM(value) !== date_1.formatUnixDateToHumanStringMMM(prevValue);
|
|
129
|
+
var newMonth = !prevValue || (0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
|
|
137
130
|
if (newMonth) {
|
|
138
|
-
return date_1.formatUnixDateToHumanStringMMM(value);
|
|
131
|
+
return (0, date_1.formatUnixDateToHumanStringMMM)(value);
|
|
139
132
|
}
|
|
140
133
|
else {
|
|
141
|
-
return date_1.formatUnixDateToHumanStringDD(value);
|
|
134
|
+
return (0, date_1.formatUnixDateToHumanStringDD)(value);
|
|
142
135
|
}
|
|
143
136
|
}
|
|
144
137
|
else if (tradeChartLabelFormat === ETradeChartLabelFormat.Months) {
|
|
145
|
-
var newYear = !prevValue || date_1.formatUnixDateToHumanStringYYYY(value) !== date_1.formatUnixDateToHumanStringYYYY(prevValue);
|
|
138
|
+
var newYear = !prevValue || (0, date_1.formatUnixDateToHumanStringYYYY)(value) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevValue);
|
|
146
139
|
if (newYear) {
|
|
147
|
-
return date_1.formatUnixDateToHumanStringYYYY(value);
|
|
140
|
+
return (0, date_1.formatUnixDateToHumanStringYYYY)(value);
|
|
148
141
|
}
|
|
149
142
|
// If previous label was year, display month label
|
|
150
143
|
var prevPrevNewYear = !prevPrevValue ||
|
|
151
|
-
date_1.formatUnixDateToHumanStringYYYY(prevValue) !== date_1.formatUnixDateToHumanStringYYYY(prevPrevValue);
|
|
152
|
-
var newMonth = prevPrevNewYear || date_1.formatUnixDateToHumanStringMMM(value) !== date_1.formatUnixDateToHumanStringMMM(prevValue);
|
|
144
|
+
(0, date_1.formatUnixDateToHumanStringYYYY)(prevValue) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevPrevValue);
|
|
145
|
+
var newMonth = prevPrevNewYear || (0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
|
|
153
146
|
if (newMonth) {
|
|
154
|
-
return date_1.formatUnixDateToHumanStringMMM(value);
|
|
147
|
+
return (0, date_1.formatUnixDateToHumanStringMMM)(value);
|
|
155
148
|
}
|
|
156
|
-
return date_1.formatUnixDateToHumanStringDD(value);
|
|
149
|
+
return (0, date_1.formatUnixDateToHumanStringDD)(value);
|
|
157
150
|
}
|
|
158
|
-
return number_1.formatNumber(value, NumericFormat_1.ENumericFormat.Date_DDMMYYYY, 0);
|
|
151
|
+
return (0, number_1.formatNumber)(value, NumericFormat_1.ENumericFormat.Date_DDMMYYYY, 0);
|
|
159
152
|
};
|
|
160
153
|
return SmartDateLabelProvider;
|
|
161
154
|
}(LabelProviderBase2D_1.LabelProviderBase2D));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ELabelProviderType } from "../../../../types/LabelProviderType";
|
|
2
2
|
import { TextureManager } from "../../TextureManager/TextureManager";
|
|
3
3
|
import { TTextStyle } from "../AxisCore";
|
|
4
|
+
import { TCachedLabelStyle } from "./LabelCache";
|
|
4
5
|
import { ILabel2DOptions, LabelProviderBase2D } from "./LabelProviderBase2D";
|
|
5
6
|
export interface ITextLabelOptions extends ILabel2DOptions {
|
|
6
7
|
/**
|
|
@@ -61,15 +62,17 @@ export declare class TextLabelProvider extends LabelProviderBase2D {
|
|
|
61
62
|
set lineSpacing(value: number);
|
|
62
63
|
onBeginAxisDraw(): void;
|
|
63
64
|
getLabelWidth(ctx: CanvasRenderingContext2D, labelText: string, labelStyle?: TTextStyle): number;
|
|
64
|
-
|
|
65
|
+
getLabelTextureAsync(labelText: string, textureManager: TextureManager, labelStyle: TTextStyle): Promise<import("../../TextureManager/TextureManager").TTextureObject>;
|
|
66
|
+
getLabelTexture(labelText: string, textureManager: TextureManager, labelStyle: TTextStyle): import("../../TextureManager/TextureManager").TTextureObject;
|
|
65
67
|
/**
|
|
66
68
|
* Convert the label text to an array of lines
|
|
67
69
|
*/
|
|
68
70
|
wrapText(text: string): string[];
|
|
69
71
|
toJSON(): {
|
|
70
72
|
type: string;
|
|
71
|
-
options: Required<
|
|
73
|
+
options: Required<Omit<import("./LabelProvider").ILabelOptions, never>>;
|
|
72
74
|
};
|
|
75
|
+
protected getCachedStyle(): TCachedLabelStyle;
|
|
73
76
|
}
|
|
74
77
|
/**
|
|
75
78
|
* Convert a string into an array of lines by splitting on spaces and wrapping to a maximum number of characters
|
|
@@ -3,19 +3,70 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
+
function step(op) {
|
|
42
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
+
while (_) try {
|
|
44
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
+
switch (op[0]) {
|
|
47
|
+
case 0: case 1: t = op; break;
|
|
48
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
+
default:
|
|
52
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
+
if (t[2]) _.ops.pop();
|
|
57
|
+
_.trys.pop(); continue;
|
|
58
|
+
}
|
|
59
|
+
op = body.call(thisArg, _);
|
|
60
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
15
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
65
|
exports.wrapText = exports.TextLabelProvider = void 0;
|
|
17
66
|
var LabelProviderType_1 = require("../../../../types/LabelProviderType");
|
|
67
|
+
var TextureWorker_1 = require("../../../Services/Workers/TextureWorker");
|
|
18
68
|
var TextureManager_1 = require("../../TextureManager/TextureManager");
|
|
69
|
+
var LabelCache_1 = require("./LabelCache");
|
|
19
70
|
var LabelProviderBase2D_1 = require("./LabelProviderBase2D");
|
|
20
71
|
var TextLabelProvider = /** @class */ (function (_super) {
|
|
21
72
|
__extends(TextLabelProvider, _super);
|
|
@@ -102,10 +153,10 @@ var TextLabelProvider = /** @class */ (function (_super) {
|
|
|
102
153
|
TextLabelProvider.prototype.onBeginAxisDraw = function () { };
|
|
103
154
|
TextLabelProvider.prototype.getLabelWidth = function (ctx, labelText, labelStyle) {
|
|
104
155
|
if (this.rotation % 90 === 0 || !this.parentAxis.isHorizontalAxis) {
|
|
105
|
-
var cachedlabel =
|
|
156
|
+
var cachedlabel = LabelCache_1.labelCache.getLabel(labelText, this.styleId);
|
|
106
157
|
if (!cachedlabel) {
|
|
107
158
|
var padding = labelStyle.padding;
|
|
108
|
-
return TextureManager_1.measureTextWidth(ctx, labelText) + padding.left + padding.right;
|
|
159
|
+
return (0, TextureManager_1.measureTextWidth)(ctx, labelText) + padding.left + padding.right;
|
|
109
160
|
}
|
|
110
161
|
return cachedlabel.textureWidth;
|
|
111
162
|
}
|
|
@@ -116,6 +167,31 @@ var TextLabelProvider = /** @class */ (function (_super) {
|
|
|
116
167
|
labelStyle.padding.right);
|
|
117
168
|
}
|
|
118
169
|
};
|
|
170
|
+
TextLabelProvider.prototype.getLabelTextureAsync = function (labelText, textureManager, labelStyle) {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
172
|
+
var image, lines;
|
|
173
|
+
return __generator(this, function (_a) {
|
|
174
|
+
switch (_a.label) {
|
|
175
|
+
case 0:
|
|
176
|
+
if (!TextureWorker_1.textureWorker.isActive) return [3 /*break*/, 5];
|
|
177
|
+
image = void 0;
|
|
178
|
+
if (!Array.isArray(labelText)) return [3 /*break*/, 2];
|
|
179
|
+
return [4 /*yield*/, TextureWorker_1.textureWorker.measureAndGetImageData(labelText, labelStyle, this.rotation, this.lineSpacing)];
|
|
180
|
+
case 1:
|
|
181
|
+
image = _a.sent();
|
|
182
|
+
return [3 /*break*/, 4];
|
|
183
|
+
case 2:
|
|
184
|
+
lines = this.wrapText(labelText);
|
|
185
|
+
return [4 /*yield*/, TextureWorker_1.textureWorker.measureAndGetImageData(lines, labelStyle, this.rotation, this.lineSpacing)];
|
|
186
|
+
case 3:
|
|
187
|
+
image = _a.sent();
|
|
188
|
+
_a.label = 4;
|
|
189
|
+
case 4: return [2 /*return*/, textureManager.createTextureFromImageData(image.imageData, image.textureWidth, image.textureHeight)];
|
|
190
|
+
case 5: return [2 /*return*/, this.getLabelTexture(labelText, textureManager, labelStyle)];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
};
|
|
119
195
|
TextLabelProvider.prototype.getLabelTexture = function (labelText, textureManager, labelStyle) {
|
|
120
196
|
if (Array.isArray(labelText)) {
|
|
121
197
|
return textureManager.createTextTexture(labelText, labelStyle, this.rotation, this.lineSpacing);
|
|
@@ -129,7 +205,7 @@ var TextLabelProvider = /** @class */ (function (_super) {
|
|
|
129
205
|
* Convert the label text to an array of lines
|
|
130
206
|
*/
|
|
131
207
|
TextLabelProvider.prototype.wrapText = function (text) {
|
|
132
|
-
return exports.wrapText(text, this.maxLength);
|
|
208
|
+
return (0, exports.wrapText)(text, this.maxLength);
|
|
133
209
|
};
|
|
134
210
|
TextLabelProvider.prototype.toJSON = function () {
|
|
135
211
|
var json = _super.prototype.toJSON.call(this);
|
|
@@ -141,13 +217,17 @@ var TextLabelProvider = /** @class */ (function (_super) {
|
|
|
141
217
|
Object.assign(json.options, options);
|
|
142
218
|
return json;
|
|
143
219
|
};
|
|
220
|
+
TextLabelProvider.prototype.getCachedStyle = function () {
|
|
221
|
+
var axis = this.parentAxis;
|
|
222
|
+
return __assign(__assign({}, axis.dpiAdjustedLabelStyle), { rotation: this.rotation, extras: "ls".concat(this.lineSpacing, ",ml").concat(this.maxLength), providerId: this.useSharedCache ? undefined : this.providerId });
|
|
223
|
+
};
|
|
144
224
|
return TextLabelProvider;
|
|
145
225
|
}(LabelProviderBase2D_1.LabelProviderBase2D));
|
|
146
226
|
exports.TextLabelProvider = TextLabelProvider;
|
|
147
227
|
/**
|
|
148
228
|
* Convert a string into an array of lines by splitting on spaces and wrapping to a maximum number of characters
|
|
149
229
|
*/
|
|
150
|
-
|
|
230
|
+
var wrapText = function (text, maxLength) {
|
|
151
231
|
if (maxLength === 0)
|
|
152
232
|
return [text];
|
|
153
233
|
var lines = [];
|
|
@@ -175,3 +255,4 @@ exports.wrapText = function (text, maxLength) {
|
|
|
175
255
|
lines.push(line);
|
|
176
256
|
return lines;
|
|
177
257
|
};
|
|
258
|
+
exports.wrapText = wrapText;
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -40,7 +42,8 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
40
42
|
_this.logBaseProperty = 10;
|
|
41
43
|
_this.tickProvider = new LogarithmicTickProvider_1.LogarithmicTickProvider(wasmContext);
|
|
42
44
|
_this.deltaCalculator = new LogarithmicDeltaCalculator_1.LogarithmicDeltaCalculator(wasmContext);
|
|
43
|
-
_this.labelProvider =
|
|
45
|
+
_this.labelProvider =
|
|
46
|
+
(_a = options === null || options === void 0 ? void 0 : options.labelProvider) !== null && _a !== void 0 ? _a : new LogarithmicLabelProvider_1.LogarithmicLabelProvider(options);
|
|
44
47
|
_this.logBase = (_b = options === null || options === void 0 ? void 0 : options.logBase) !== null && _b !== void 0 ? _b : _this.logBaseProperty;
|
|
45
48
|
_this.isNegativeProperty = (_c = options === null || options === void 0 ? void 0 : options.isNegative) !== null && _c !== void 0 ? _c : false;
|
|
46
49
|
_this.visibleRange = (options === null || options === void 0 ? void 0 : options.visibleRange) || _this.getDefaultNonZeroRange();
|
|
@@ -191,7 +194,8 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
191
194
|
.filter(function (s) { return s.yAxisId === _this.id && s.isVisible && s.hasDataSeriesValues(); });
|
|
192
195
|
visibleSeries.forEach(function (rSeries) {
|
|
193
196
|
// Get pre-calculated XRange if exists, otherwise, fetch from the axis for this series
|
|
194
|
-
var xVisibleRange = (xRanges === null || xRanges === void 0 ? void 0 : xRanges.containsKey(rSeries.xAxisId))
|
|
197
|
+
var xVisibleRange = (xRanges === null || xRanges === void 0 ? void 0 : xRanges.containsKey(rSeries.xAxisId))
|
|
198
|
+
? xRanges.item(rSeries.xAxisId)
|
|
195
199
|
: _this.getXVisibleRange(rSeries.xAxisId);
|
|
196
200
|
var isXCategoryAxis = _this.getIsXCategoryAxis(rSeries.xAxisId);
|
|
197
201
|
if (xVisibleRange) {
|
|
@@ -231,6 +235,7 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
231
235
|
this.visibleRangeAnimationToken = NumberRangeAnimator_1.NumberRangeAnimator.animate(this.visibleRange, visibleRange, durationMs, function (range) {
|
|
232
236
|
_this.visibleRange = range;
|
|
233
237
|
}, onCompleted, easingFunction, true);
|
|
238
|
+
this.parentSurface.addAnimation(this.visibleRangeAnimationToken);
|
|
234
239
|
return this.visibleRangeAnimationToken;
|
|
235
240
|
};
|
|
236
241
|
LogarithmicAxis.prototype.scale = function (initialRange, delta, isMoreThanHalf) {
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -41,7 +43,8 @@ var NumericAxis = /** @class */ (function (_super) {
|
|
|
41
43
|
var _this = _super.call(this, webAssemblyContext, options) || this;
|
|
42
44
|
_this.type = AxisType_1.EAxisType.NumericAxis;
|
|
43
45
|
_this.tickProvider = new NumericTickProvider_1.NumericTickProvider(_this.webAssemblyContext2D);
|
|
44
|
-
_this.labelProvider =
|
|
46
|
+
_this.labelProvider =
|
|
47
|
+
(_a = options === null || options === void 0 ? void 0 : options.labelProvider) !== null && _a !== void 0 ? _a : new NumericLabelProvider_1.NumericLabelProvider(options);
|
|
45
48
|
_this.deltaCalculator = new NumericDeltaCalculator_1.NumericDeltaCalculator(_this.webAssemblyContext2D);
|
|
46
49
|
return _this;
|
|
47
50
|
}
|
|
@@ -18,6 +18,6 @@ function getAxisGeneric(axes, axisId) {
|
|
|
18
18
|
return axis;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
console.warn("scichart getAxisGeneric(): Axis with Id '"
|
|
21
|
+
console.warn("scichart getAxisGeneric(): Axis with Id '".concat(axisId, "' was not found"));
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
@@ -10,6 +10,7 @@ exports.createNativeRect = void 0;
|
|
|
10
10
|
* @param xBottomRight
|
|
11
11
|
* @param yBottomRight
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
var createNativeRect = function (webAssemblyContext, xTopLeft, yTopLeft, xBottomRight, yBottomRight) {
|
|
14
14
|
return new webAssemblyContext.SCRTRectVertex(xTopLeft, yTopLeft, xBottomRight - xTopLeft, yBottomRight - yTopLeft);
|
|
15
15
|
};
|
|
16
|
+
exports.createNativeRect = createNativeRect;
|
|
@@ -14,15 +14,15 @@ var parseColor_1 = require("../../../utils/parseColor");
|
|
|
14
14
|
* @param opacity The opacity factor
|
|
15
15
|
* @param strokeDashArray the StrokeDashArray which defines any dash e.g. [2,2] means dash for 2pts, gap for 2pts (or undefined = solid line).
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
var createSCRTPen = function (wasmContext, htmlColorCode, strokeThickness, opacity, strokeDashArray, antiAliased) {
|
|
18
18
|
if (antiAliased === void 0) { antiAliased = true; }
|
|
19
19
|
if (app_1.IS_TEST_ENV || !htmlColorCode) {
|
|
20
20
|
return undefined;
|
|
21
21
|
}
|
|
22
22
|
// the logic for calculating an opacity should be consistent when creating new and updating an existing pen or brush
|
|
23
|
-
var colorArgb = colorUtil_1.uintArgbColorMultiplyOpacity(parseColor_1.parseColorToUIntArgb(htmlColorCode), opacity);
|
|
23
|
+
var colorArgb = (0, colorUtil_1.uintArgbColorMultiplyOpacity)((0, parseColor_1.parseColorToUIntArgb)(htmlColorCode), opacity);
|
|
24
24
|
if (isNaN(colorArgb)) {
|
|
25
|
-
throw new Error("Color code "
|
|
25
|
+
throw new Error("Color code ".concat(htmlColorCode, " cannot be converted to an ARGB integer"));
|
|
26
26
|
}
|
|
27
27
|
if (strokeDashArray && strokeDashArray.length) {
|
|
28
28
|
// Create a dashed pen
|
|
@@ -33,3 +33,4 @@ exports.createSCRTPen = function (wasmContext, htmlColorCode, strokeThickness, o
|
|
|
33
33
|
// Create a normal pen
|
|
34
34
|
return new wasmContext.SCRTPen(colorArgb, strokeThickness, antiAliased);
|
|
35
35
|
};
|
|
36
|
+
exports.createSCRTPen = createSCRTPen;
|
|
@@ -10,15 +10,16 @@ var parseColor_1 = require("../../../utils/parseColor");
|
|
|
10
10
|
* access to our WebGL2 Engine and WebAssembly numerical methods
|
|
11
11
|
* @param htmlColorCode Html color code in the format "#fff", "#ff0000", "rgba(255,255,0,1)", "#11333333"
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
var createSolidBrush = function (wasmContext, htmlColorCode, opacity) {
|
|
14
14
|
if (app_1.IS_TEST_ENV || !htmlColorCode) {
|
|
15
15
|
return undefined;
|
|
16
16
|
}
|
|
17
17
|
// the logic for calculating an opacity should be consistent when creating new and updating an existing pen or brush
|
|
18
|
-
var colorArgb = colorUtil_1.uintArgbColorMultiplyOpacity(parseColor_1.parseColorToUIntArgb(htmlColorCode), opacity);
|
|
19
|
-
var isTransparent = colorUtil_1.uintArgbColorIsTransparent(colorArgb);
|
|
18
|
+
var colorArgb = (0, colorUtil_1.uintArgbColorMultiplyOpacity)((0, parseColor_1.parseColorToUIntArgb)(htmlColorCode), opacity);
|
|
19
|
+
var isTransparent = (0, colorUtil_1.uintArgbColorIsTransparent)(colorArgb);
|
|
20
20
|
if (isNaN(colorArgb)) {
|
|
21
|
-
throw new Error("Color code "
|
|
21
|
+
throw new Error("Color code ".concat(htmlColorCode, " cannot be converted to an ARGB integer"));
|
|
22
22
|
}
|
|
23
23
|
return new wasmContext.SCRTSolidBrush(colorArgb, isTransparent);
|
|
24
24
|
};
|
|
25
|
+
exports.createSolidBrush = createSolidBrush;
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.drawBorder = void 0;
|
|
4
4
|
var createNativeRect_1 = require("./createNativeRect");
|
|
5
|
-
|
|
5
|
+
var drawBorder = function (renderContext, webAssemblyContext2D, solidBrushCacheBorder, borderRect, leftBorder, topBorder, rightBorder, bottomBorder, color) {
|
|
6
6
|
if (bottomBorder === 0 && topBorder === 0 && leftBorder === 0 && rightBorder === 0) {
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
9
|
var solidBrush = solidBrushCacheBorder.newBrush(color, true);
|
|
10
10
|
var vecRects = new webAssemblyContext2D.VectorRectVertex();
|
|
11
|
-
vecRects.push_back(createNativeRect_1.createNativeRect(webAssemblyContext2D, borderRect.x, borderRect.y - topBorder, borderRect.x + borderRect.width + rightBorder, borderRect.y));
|
|
12
|
-
vecRects.push_back(createNativeRect_1.createNativeRect(webAssemblyContext2D, borderRect.x + borderRect.width, borderRect.y, borderRect.x + borderRect.width + rightBorder, borderRect.y + borderRect.height + bottomBorder));
|
|
13
|
-
vecRects.push_back(createNativeRect_1.createNativeRect(webAssemblyContext2D, borderRect.x - leftBorder, borderRect.y + borderRect.height, borderRect.x + borderRect.width, borderRect.y + borderRect.height + bottomBorder));
|
|
14
|
-
vecRects.push_back(createNativeRect_1.createNativeRect(webAssemblyContext2D, borderRect.x - leftBorder, borderRect.y - topBorder, borderRect.x, borderRect.y + borderRect.height));
|
|
11
|
+
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x, borderRect.y - topBorder, borderRect.x + borderRect.width + rightBorder, borderRect.y));
|
|
12
|
+
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x + borderRect.width, borderRect.y, borderRect.x + borderRect.width + rightBorder, borderRect.y + borderRect.height + bottomBorder));
|
|
13
|
+
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x - leftBorder, borderRect.y + borderRect.height, borderRect.x + borderRect.width, borderRect.y + borderRect.height + bottomBorder));
|
|
14
|
+
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x - leftBorder, borderRect.y - topBorder, borderRect.x, borderRect.y + borderRect.height));
|
|
15
15
|
renderContext.drawRects(vecRects, solidBrush, 0, 0);
|
|
16
16
|
vecRects.delete();
|
|
17
17
|
};
|
|
18
|
+
exports.drawBorder = drawBorder;
|
|
@@ -15,7 +15,7 @@ exports.getLabelCoordinates = exports.drawAxisMarkerAnnotation = exports.drawLin
|
|
|
15
15
|
var Rect_1 = require("../../../Core/Rect");
|
|
16
16
|
var AxisAlignment_1 = require("../../../types/AxisAlignment");
|
|
17
17
|
var LabelPlacement_1 = require("../../../types/LabelPlacement");
|
|
18
|
-
|
|
18
|
+
var drawModifiersAxisLabel = function (currentAxis, renderContext, labelCoord, fill, stroke) {
|
|
19
19
|
if (!currentAxis.isVisible) {
|
|
20
20
|
return undefined;
|
|
21
21
|
}
|
|
@@ -23,10 +23,11 @@ exports.drawModifiersAxisLabel = function (currentAxis, renderContext, labelCoor
|
|
|
23
23
|
var textStyle = __assign(__assign({}, currentAxis.dpiAdjustedLabelStyle), { color: stroke });
|
|
24
24
|
return currentAxis.axisRenderer.drawModifiersAxisLabel(renderContext, formattedDataValue, labelCoord, currentAxis.axisAlignment, textStyle, fill);
|
|
25
25
|
};
|
|
26
|
+
exports.drawModifiersAxisLabel = drawModifiersAxisLabel;
|
|
26
27
|
/**
|
|
27
28
|
* Function to draw Vertical or Horizontal Line annotations with labels
|
|
28
29
|
*/
|
|
29
|
-
|
|
30
|
+
var drawLineAnnotation = function (currentAxis, renderContext, labelPlacement, displayValue, x1Coord, x2Coord, y1Coord, y2Coord, textStyle, fill, strokePen, viewRect, showLabel, opacity) {
|
|
30
31
|
var nativeContext = renderContext.getNativeContext();
|
|
31
32
|
var axisAlignment = currentAxis.axisAlignment;
|
|
32
33
|
var displayVertically = (axisAlignment === AxisAlignment_1.EAxisAlignment.Top || axisAlignment === AxisAlignment_1.EAxisAlignment.Bottom) &&
|
|
@@ -42,7 +43,7 @@ exports.drawLineAnnotation = function (currentAxis, renderContext, labelPlacemen
|
|
|
42
43
|
var labelRect;
|
|
43
44
|
if (showLabel) {
|
|
44
45
|
var _a = currentAxis.axisRenderer.createAnnotationLabelTexture(text, labelTextStyle, labelBackgroundColor, displayVertically, displayMirrored, opacity), bitmapTexture = _a.bitmapTexture, textureHeight = _a.textureHeight, textureWidth = _a.textureWidth;
|
|
45
|
-
var _b = exports.getLabelCoordinates(currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth), xPosition = _b.xPosition, yPosition = _b.yPosition;
|
|
46
|
+
var _b = (0, exports.getLabelCoordinates)(currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth), xPosition = _b.xPosition, yPosition = _b.yPosition;
|
|
46
47
|
labelHeight = textureHeight;
|
|
47
48
|
labelWidth = textureWidth;
|
|
48
49
|
labelRect = new Rect_1.Rect(xPosition, yPosition, textureWidth, textureHeight);
|
|
@@ -53,25 +54,27 @@ exports.drawLineAnnotation = function (currentAxis, renderContext, labelPlacemen
|
|
|
53
54
|
renderContext.drawLine(x1LineCoord, y1LineCoord, x2LineCoord, y2LineCoord, strokePen, viewRect);
|
|
54
55
|
return labelRect;
|
|
55
56
|
};
|
|
56
|
-
exports.
|
|
57
|
+
exports.drawLineAnnotation = drawLineAnnotation;
|
|
58
|
+
var drawAxisMarkerAnnotation = function (currentAxis, renderContext, displayValue, markerCoordinate, x1Coord, y1Coord, textStyle, fill, opacity, image, imageWidth, imageHeight) {
|
|
57
59
|
var nativeContext = renderContext.getNativeContext();
|
|
58
60
|
var axisAlignment = currentAxis.axisAlignment;
|
|
59
61
|
var text = displayValue || getLabelValue(currentAxis, markerCoordinate);
|
|
60
62
|
var _a = image
|
|
61
63
|
? currentAxis.axisRenderer.createAxisMarkerFromImage(image, imageWidth, imageHeight)
|
|
62
64
|
: currentAxis.axisRenderer.createAxisMarker(axisAlignment, text, textStyle, fill, opacity), bitmapTexture = _a.bitmapTexture, textureHeight = _a.textureHeight, textureWidth = _a.textureWidth;
|
|
63
|
-
var _b = exports.getLabelCoordinates(currentAxis, LabelPlacement_1.ELabelPlacement.Axis, x1Coord, x1Coord, y1Coord, y1Coord, textureHeight, textureWidth), xPosition = _b.xPosition, yPosition = _b.yPosition;
|
|
65
|
+
var _b = (0, exports.getLabelCoordinates)(currentAxis, LabelPlacement_1.ELabelPlacement.Axis, x1Coord, x1Coord, y1Coord, y1Coord, textureHeight, textureWidth), xPosition = _b.xPosition, yPosition = _b.yPosition;
|
|
64
66
|
if (bitmapTexture) {
|
|
65
67
|
nativeContext.DrawTexture(bitmapTexture, Math.round(xPosition), Math.round(yPosition), textureWidth, textureHeight);
|
|
66
68
|
bitmapTexture.delete();
|
|
67
69
|
}
|
|
68
70
|
return { xPosition: xPosition, yPosition: yPosition, textureWidth: textureWidth, textureHeight: textureHeight };
|
|
69
71
|
};
|
|
72
|
+
exports.drawAxisMarkerAnnotation = drawAxisMarkerAnnotation;
|
|
70
73
|
/**
|
|
71
74
|
* Calculates coordinates of the annotation label.
|
|
72
75
|
* The coordinates are defined as an absolute position on the whole SciChartSurface.
|
|
73
76
|
*/
|
|
74
|
-
|
|
77
|
+
var getLabelCoordinates = function (currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth) {
|
|
75
78
|
var axisAlignment = currentAxis.axisAlignment, seriesViewRect = currentAxis.parentSurface.seriesViewRect, axisViewRect = currentAxis.viewRect;
|
|
76
79
|
var xPosition = 0;
|
|
77
80
|
var yPosition = 0;
|
|
@@ -244,6 +247,7 @@ exports.getLabelCoordinates = function (currentAxis, labelPlacement, x1Coord, x2
|
|
|
244
247
|
}
|
|
245
248
|
return { xPosition: xPosition, yPosition: yPosition };
|
|
246
249
|
};
|
|
250
|
+
exports.getLabelCoordinates = getLabelCoordinates;
|
|
247
251
|
/**
|
|
248
252
|
* Calculates annotation line coordinates accordingly to axis alignment and label placement.
|
|
249
253
|
* Returns coordinates relative to seriesViewRect.
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -87,7 +89,7 @@ var SciChartLegend = /** @class */ (function (_super) {
|
|
|
87
89
|
var _a;
|
|
88
90
|
return ({
|
|
89
91
|
id: rs.id,
|
|
90
|
-
name: (_a = rs.getDataSeriesName()) !== null && _a !== void 0 ? _a : "Series "
|
|
92
|
+
name: (_a = rs.getDataSeriesName()) !== null && _a !== void 0 ? _a : "Series ".concat(index + 1),
|
|
91
93
|
color: rs.isStacked ? rs.fill : rs.stroke,
|
|
92
94
|
checked: rs.isVisible,
|
|
93
95
|
gradient: undefined
|