export default createTrendlineService; export type TrendlinesService = { /** * Gets the components. */ getComponents: () => object[]; /** * Gets the trendline data (pass on to picasso). */ getData: () => object[]; /** * get trendline model for extra information */ getModel: () => object; /** * Update the data from the current hypercube and zoom. */ update: () => undefined; /** * collect a node for the closest point on a trendline (for tooltip) */ collectNodes: () => object[]; }; /** * @typedef {object} TrendlinesService * @property {function():object[]} getComponents Gets the components. * @property {function():object[]} getData Gets the trendline data (pass on to picasso). * @property {function():object} getModel get trendline model for extra information * @property {function():undefined} update Update the data from the current hypercube and zoom. * @property {function():object[]} collectNodes collect a node for the closest point on a trendline (for tooltip) */ /** * Creates a trendlines-service. * * @param {object} args Arguments object. * @param {object} [args.animations] PicassoJS component animation settings. * @param {object} args.chart PicassoJS chart instance. * @param {object} args.colorService Color service instance. * @param {object} [args.isEnabled] an isEnabled function. * @param {object} args.keys.majorScale major scale key. * @param {object} args.keys.minorScale minor scale key. * @param {object} args.keys.trendlines trendline component key. * @param {object} [args.keys.tooltipOverlay] trendline tooltip overlay key. (will only be added if a key is set) * @param {object} args.layoutService Layout service instance. * @param {'horizontal'|'vertical'} args.orientation component orientation. * @param {object} [args.translator] Translator instance. * @param {object} [args.getMinMax] Function to get min/max. (zoom) (only required for when dimension is continuous) * * @returns {TrendlinesService} The created trendlines-service. * * @example * * const service = createTrendlinesService({ * animations, * chart, * colorService, * getMinMax: () => viewState.get('zoom'), * isEnabled, * keys: { * majorScale, * minorScale, * tooltip, * tooltipOverlay, * }, * layoutService, * orientation, * translator, * }); * * const components = [...service.getComponents()]; */ declare function createTrendlineService(args: { animations?: object | undefined; chart: object; colorService: object; isEnabled?: object | undefined; }): TrendlinesService; declare namespace createTrendlineService { export { propertyPanelProperties }; } import propertyPanelProperties from './property-panel-properties';