UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

101 lines (100 loc) 5.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SciChartDefaults = void 0; var EUseWasmSimd_1 = require("../../types/EUseWasmSimd"); var WatermarkPosition_1 = require("../../types/WatermarkPosition"); var loader_1 = require("./loader"); var SciChartDefaults = /** @class */ (function () { function SciChartDefaults() { } /** * Set this true to allow reuse of label textures across different axes and different charts */ SciChartDefaults.useSharedCache = true; /** * NOT RECOMMENDED UNLESS IN DEBUG MODE: Turn on/off adaptive, visually lossless resampling algorithms * globally for the entire application. * * To do this on a per-series basis use {@link BaseRenderableSeries.resamplingMode}. For precision issues try * adjusting the {@link BaseRenderableSeries.resamplingPrecision} property */ SciChartDefaults.debugDisableResampling = false; /** * Turn on/off warnings to optimize performance */ SciChartDefaults.performanceWarnings = true; /** * Whether to use WebGL for rendering axis labels. Default true (was false before v4). * These are much faster than rendering using canvas text, but do not have quite the same font and style support. * * You can set useNativeText on an individual axis using to override this setting. */ SciChartDefaults.useNativeText = true; /** * Time in ms to retry loading a native font. If you need to load a large font over a potentially slow connection await sciChartSurface.registerFont */ SciChartDefaults.nativeFontTimeout = 2000; /** * The default position of the watermark for trials */ SciChartDefaults.watermarkPosition = WatermarkPosition_1.EWatermarkPosition.BottomLeft; /** For 2D charts the watermark is normally positioned within the series area. Set this true to place it relative to the overall canvas. */ SciChartDefaults.watermarkRelativeToCanvas = false; /** * Allows you to customize the loading elements or animation as part of the HTML page / DOM when a {@link SciChartSurface} * or {@link SciChart3DSurface} is loading WebAssembly. * * Set to false for disabling. */ SciChartDefaults.defaultLoader = new loader_1.DefaultSciChartLoader(); /** * Optional - the option of disabling / enabling scaling of the {@link SciChartSurfaceBase}. * If false - the {@link SciChartSurfaceBase} will take the height and width of parent div without scaling. */ SciChartDefaults.disableAspect = false; /** * For 2D charts a number of buffers are created to process data. Buffer size by default grows with usage and caps out at 8,192kb. * A total of 10 buffers are created for different scenarios. * When SciChartSurface.create() is used this results in a maximum of 80MB memory as a static overhead for the application. * When SciChartSurface.createSingle() is used this results in up to 80MB memory *per chart* as a static overhead. * Lowering this number to 2048kb (or 1024kb) will reduce memory usage for the SciChart 2D Engine but may impact chart drawing performance. * @remarks This property needs to be set before charts created and cannot be dynamically adjusted after that. * Do not set lower than 1024kb or higher than 32MB (1024 x 32). Values outside this range will be clamped */ SciChartDefaults.wasmBufferSizesKb = 1024 * 8; /** * Defines if newly created charts should be rendered as soon as possible after initialization. * Setting to `true` will require surfaces to be "resumed" in order to perform actual rendering. */ SciChartDefaults.createSuspended = false; /** * Defines how WebAssembly SIMD should be used by SciChart. * * - Always: Always use SIMD-enabled binaries (you must serve scichart2d.wasm, scichart3d.wasm) * - Never: Never use SIMD, always use fallback binaries (you must serve scichart2d-nosimd.wasm, scichart3d-nosimd.wasm) * - Auto: Automatically detect SIMD support and choose appropriate binary (you must serve both variants) * * @see {@link SimdHelper} for SIMD detection utilities * @see {@link EUseWasmSimd} for enum values */ SciChartDefaults.useWasmSimd = EUseWasmSimd_1.EUseWasmSimd.Auto; /** * Defines the Default font name. If the font set to this value if will pick the nativeFontFamily or canvasFontFamily */ SciChartDefaults.autoFontName = "auto"; /** * Defines Native text font family for Default font name. The default font family loads Arimo Regular font. */ SciChartDefaults.nativeFontFamily = "default"; /** * Defines Canvas text font family for Default font name */ SciChartDefaults.canvasFontFamily = "Arial"; /** * From v5.0 updates to svg annotations will not trigger a redraw of the whole chart. * Set this to true to revert to the old behaviour. You can also set this per annotation using annotation.reDrawChartOnChange */ SciChartDefaults.alwaysRedrawFullChartOnSvgChange = false; return SciChartDefaults; }()); exports.SciChartDefaults = SciChartDefaults;