@formant/ava
Version:
A framework for automated visual analytics.
23 lines (22 loc) • 1.2 kB
TypeScript
import type { ChartKnowledge } from '../../ckb';
import type { Data } from '../../common/types';
import type { BasicDataPropertyForAdvice, RuleModule } from '../ruler/types';
import type { AdvisorOptions, SmartColorOptions, AdviseResult } from '../types';
/**
* options for advising inner pipeline
*/
type PipeAdvisorOptions = AdvisorOptions;
/**
* recommending charts given data and dataProps, based on CKB and RuleBase
*
* @param data input data [ {a: xxx, b: xxx}, ... ]
* @param dataProps data props derived from data or customized by users
* @param chartWIKI ckb
* @param ruleBase rule base
* @param smartColor switch smart color on/off, optional props, default is off
* @param options options for advising such as log, preferences
* @param colorOptions color options, optional props, @see {@link SmartColorOptions}
* @returns chart list [ { type: chartTypes, spec: antv-spec, score: >0 }, ... ]
*/
export declare function dataToAdvices(data: Data, dataProps: BasicDataPropertyForAdvice[], chartWIKI: Record<string, ChartKnowledge>, ruleBase: Record<string, RuleModule>, smartColor?: boolean, options?: PipeAdvisorOptions, colorOptions?: SmartColorOptions): AdviseResult;
export {};