import { DataSource } from '../common/interfaces/DataSource'; import { VizConfig } from '../common/interfaces/VizConfig'; interface PieOptions { [key: string]: any; } /** * Helper method to convert option which contains object literal values (e.g. arrays, objects) * to strings as SC can only accept their stringified equivalents * @method convertToStringValues * @param {Object} options * @returns {Object} */ export declare const convertToStringValues: (options: PieOptions) => PieOptions; interface LabelDisplayOptions extends PieOptions { labelDisplay?: string; } /** * Helper method to map labelDisplay options to jsCharting options * @method mapLabelDisplay * @param {Object} options * @returns {Object} */ export declare const mapLabelDisplay: ({ labelDisplay, ...options }: LabelDisplayOptions) => PieOptions; interface LegendDisplayOptions extends PieOptions { legendPlacement?: string; } export declare const mapLegendDisplay: (options: LegendDisplayOptions) => PieOptions; /** * Helper method to update the option names which can be mapped to SimpleXML options or * can be used directly with SC if don't have a 1-1 mapping in SimpleXML * @method mapToOldKey * @param {Object} options * @returns {Object} */ export declare const mapToOldKey: (options: PieOptions) => PieOptions; /** * Chained helper for mapping the option properties (and values) we expose in config.ts into property values that splunk-charting accepts * This is for options that has new key name and can not directly be mapped with SimpleXML or * don't have a 1-1 mapping in SimpleXML (i.e. a straightforward name mapping where values are preserved) * @method convertToPieSCProperties * @param {Object} originalOptions * @returns {Object} */ export declare const convertToPieSCProperties: (originalOptions: PieOptions) => PieOptions; /** * Return all merged options (default + config) using vizConfig and options * @param options * @param vizConfig * @returns */ export declare const getPieMergedOptions: (options: Record, vizConfig: VizConfig) => Record; /** * Returns option's field index. If not found returns -1 * @param optionName * @param dataSources * @param options * @param vizConfig * @returns */ export declare const getPieOptionFieldIndex: (optionName: string, dataSources: { [name: string]: DataSource; }, options: Record, vizConfig: VizConfig) => number; /** * Returns true if columns data has invalid data format for specified option (label or value) * @param optionName * @param dataSources * @param options * @param vizConfig * @returns */ export declare const invalidOptionField: (optionName: "label" | "value", dataSources: { [name: string]: DataSource; }, options: Record, vizConfig: VizConfig) => boolean; /** * Helper function to evaluate if all data values are invalid (zero or negative) */ export declare const allInvalidDataValues: (dataSources: { [name: string]: DataSource; }, options: Record, vizConfig: VizConfig) => boolean; export declare const removeColumnsThatOnlyContain0s: (seriesList: Array>) => Array>; export {}; //# sourceMappingURL=pieUtils.d.ts.map